By stackideas newbie on Tuesday, 11 August 2015
Posted in Technical Issues
Likes 0
Views 866
Votes 0
Dear Tech Support,

I'm still having problem with the Module for Categories, despite the hack your colleague did in /components/com_easydiscuss/helpers/helper.php. I only realized the problem with sorting is still there after adding more parent categories today. As you can see from the attached, the parent categories are not sorted in alphabetical order although the child categories are.

I have entered the credentials in the site registration link you sent me the other time.

Thanks!
Hey there,

May i know my colleague Mark applied that fix in your site is it display correctly now?

If yes, what he did is this file -> JoomlaFolder\modules\mod_easydiscuss_categories\helper.php and this fix will be included in next release version.
·
Monday, 07 September 2015 15:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I am sorry that delay of this reply,

Can you provide us with your PHPMYADMIN access? because it seems like the code everything is correct, but somehow it still not display follow what you set the ordering settings from module.
·
Tuesday, 11 August 2015 13:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Arlex,

I think attached is what you need from phpmyadmin. Unless it is determined that I wouldn't be able to correct the tables/MySQL, my preference would be to try resolve this without accessing phpmyadmin.

Below is what you will see from the attached -
1) "id" #1, 2 and 51 have no "parent_id" and, thus, are the main categories, which are not sorted correctly in the module;
2) "id" #2 has a value of 1 for container, which is correctly reflected in the module; and
3) "id" #3 to 9 have "parent_id" #2 and, thus, are subcategories to container category "Forums", which is correctly displayed in the module.

It appears that the table in the database is correctly set up and nothing seems to be amiss. I am not sure if entering values under "ordering" could force a certain order but I would much rather not override this as it would make future maintenance more complicated.

Thanks again for looking into this.
·
Wednesday, 12 August 2015 03:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I am sorry that delay of this reply,

If you can provide us with your PHPMYADMIN access that was very helpful for us troubleshoot on this issue quickly.

What I trying to debug is open this file and vardump the $query and see the query is it get correctly the value base on what you set the sorting from the categories module.

JoomlaFolder\modules\mod_easydiscuss_categories\helper.php


// Try access your backend > module manager > Easydiscuss - category module > set sorting to 'ascending'
// Copy following query run in your PHPMYADMIN and see what result you getting, then open your frontpage and see is it correct
SELECT a.`id`, a.`title`, a.`avatar`, a.`alias`, a.`parent_id`, '1' AS level, COUNT(b.`id`) AS `discussioncount`, ( SELECT COUNT(id) FROM `ihr_discuss_category` WHERE lft < a.lft AND rgt > a.rgt AND a.lft != '0' ) AS depth FROM `ihr_discuss_category` AS `a` LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id` AND b.`parent_id`='0' AND b.`published`='1' WHERE a.`published` = '1' AND a.`parent_id` = '0' GROUP BY a.`id` ORDER BY a.`title` asc LIMIT 20

// Try access your backend > module manager > Easydiscuss - category module > set sorting to 'descending'
// Copy following query run in your PHPMYADMIN and see what result you getting, then open your frontpage and see is it correct
SELECT a.`id`, a.`title`, a.`avatar`, a.`alias`, a.`parent_id`, '1' AS level, COUNT(b.`id`) AS `discussioncount`, ( SELECT COUNT(id) FROM `ihr_discuss_category` WHERE lft < a.lft AND rgt > a.rgt AND a.lft != '0' ) AS depth FROM `ihr_discuss_category` AS `a` LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id` AND b.`parent_id`='0' AND b.`published`='1' WHERE a.`published` = '1' AND a.`parent_id` = '0' GROUP BY a.`id` ORDER BY a.`title` desc LIMIT 20


keep us updated the result.
·
Wednesday, 12 August 2015 22:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Arlex,

Sorry for the belated response as I have been away.

Please see Site Details below for your access to phpMyAdmin.

It's strange that this keeps happening in spite of the correct setup. Would really like to have this rectified once and for all.

Cheers!
·
Saturday, 29 August 2015 10:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Arlex,

Could you kindly give me an update on the above?

Thanks!
·
Tuesday, 01 September 2015 20:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a public holiday for us here yesterday.

I tried to execute the sql in your database but I hitting this :
Not Implemented

GET to /~contex11/bbp4ihr/FraTre3u/ not supported.
Additionally, a 501 Not Implemented error was encountered while trying to use an ErrorDocument to handle the request.


Please advise.
·
Wednesday, 02 September 2015 00:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey, Arlex,

Happy national day! Sorry I didn't realize it's holiday on Sep 1 as well.

I've spoken with the hosting service and given them the technical details. They're looking into it as we speak and I'll give you an update soon.

Do you think the error messages point to the standalone phpMyAdmin application having problem access the server because of security setup on the server side? Or do you think there are indeed problems with the server running the codes (which I think would be unlikely given there is nothing contentious in the codes and I have verified that all the system requirements for running ED are met)?

Thanks!
·
Wednesday, 02 September 2015 02:25
·
0 Likes
·
0 Votes
·
0 Comments
·
It okay, thanks

Perhaps you can send this 2 reference link to your hosting, maybe it helps identify the error.
http://ubuntuforums.org/showthread.php?t=1266984
http://www.patrickmin.com/linux/tip.php?name=phpmyadmin_tblchange
Actually I am not really sure yet, I will wait for your update from your hosting side.
·
Wednesday, 02 September 2015 02:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Arlex,

According to the hosting service, they believe the GET function is the cause of the issue because the function is disabled on servers for shared plans due to security risks. Do you think this could indeed be the reason and is there anything I could do to resolve it?

It seems strange to me this could be the problem because it doesn't seem like your other subscribers are having this problem with their hosting services.

Thanks!
·
Thursday, 03 September 2015 03:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am sorry that delay of this reply,

Yeah, that was strange.

Perhaps you can consult with your hosting again is there a way to fix this ?

when I trying to execute this query from phpmyadmin then hitting these warning :
SELECT a.`id`, a.`title`, a.`avatar`, a.`alias`, a.`parent_id`, '1' AS level, COUNT(b.`id`) AS `discussioncount`, ( SELECT COUNT(id) FROM `ihr_discuss_category` WHERE lft < a.lft AND rgt > a.rgt AND a.lft != '0' ) AS depth FROM `ihr_discuss_category` AS `a` LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id` AND b.`parent_id`='0' AND b.`published`='1' WHERE a.`published` = '1' AND a.`parent_id` = '0' GROUP BY a.`id` ORDER BY a.`title` asc LIMIT 20


Error in Processing Request
Error code: 501
Error Text: Not Implemented


After this pop up appear, then I can't click any button on that page.
·
Thursday, 03 September 2015 17:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Arlex,

I just ran the SQL's in phpMyAdmin from Cpanel directly and there doesn't seem to be any error, which means the information my hosting service gave me may be incorrect. It may well be a case where there are security restrictions with running SQL from standalone phpMyAdmin installs.

Please see below the SQL's I ran and the results shown for each. Based on this, how best do you think this can be resolved? If this require Cpanel access, could you remote to my machine so that we can do this together?

Many thanks again for the help!

SELECT a.`id` , a.`title` , a.`avatar` , a.`alias` , a.`parent_id` ,  '1' AS level, COUNT( b.`id` ) AS  `discussioncount` , (

SELECT COUNT( id )
FROM `ihr_discuss_category`
WHERE lft < a.lft
AND rgt > a.rgt
AND a.lft != '0'
) AS depth
FROM `ihr_discuss_category` AS `a`
LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id`
AND b.`parent_id` = '0'
AND b.`published` = '1'
WHERE a.`published` = '1'
AND a.`parent_id` = '0'
GROUP BY a.`id`
ORDER BY a.`title` ASC
LIMIT 20


SELECT a.`id` , a.`title` , a.`avatar` , a.`alias` , a.`parent_id` ,  '1' AS level, COUNT( b.`id` ) AS  `discussioncount` , (

SELECT COUNT( id )
FROM `ihr_discuss_category`
WHERE lft < a.lft
AND rgt > a.rgt
AND a.lft != '0'
) AS depth
FROM `ihr_discuss_category` AS `a`
LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id`
AND b.`parent_id` = '0'
AND b.`published` = '1'
WHERE a.`published` = '1'
AND a.`parent_id` = '0'
GROUP BY a.`id`
ORDER BY a.`title` DESC
LIMIT 20


SELECT a.`id` , a.`title` , a.`avatar` , a.`alias` , a.`parent_id` ,  '1' AS level, COUNT( b.`id` ) AS  `discussioncount` , (

SELECT COUNT( id )
FROM `ihr_discuss_category`
WHERE lft < a.lft
AND rgt > a.rgt
AND a.lft != '0'
) AS depth
FROM `ihr_discuss_category` AS `a`
LEFT JOIN `ihr_discuss_posts` AS `b` ON b.`category_id` = a.`id`
AND b.`parent_id` = '0'
AND b.`published` = '1'
WHERE a.`published` = '1'
AND a.`parent_id` = '0'
GROUP BY a.`id`
ORDER BY a.`title` ASC
LIMIT 20
·
Thursday, 03 September 2015 21:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

Thanks for getting back to us quickly and given us the query result.

By the way, I can't access in your Joomla backend today, I hitting this following permission issue :
Error 403 - Forbidden

You don't have permission to access the requested resource. Please contact the web site owner for further assistance.


Can you check what ordering/sorting you set from the Easydiscuss - categories module?
·
Friday, 04 September 2015 13:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Arlex,

Apologies you were not able to access the site the other day because I had to take it down to rebuilt the corrupted Assets table (although it did not impact ED). It is now back online, so you should be able to access it.

The setup in the module is as shown in the pic attached.

Many thanks again for the support!
·
Sunday, 06 September 2015 07:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here. It looks like the categories are going through an iteration as it needs to retrieve the child categories. To fix this, we need to reverse the result first before iterating the list again. I have applied the fix for you on the site and it should work fine now.

By the way, there is something really wrong with your authentication on the site and it's completely messed up. When I am logged into the back end, I am logged out from the front end and vice versa. This actually slows down our support as we have a hard time accessing your site.

Imagine this, I had to change the sorting of the module from the back end and I get logged out on the front end. I have to login again from the front end. Then, view the result. Then, I have to login to the back end again to update the settings and I get logged out again from the back end because I logged into the front end. This entire process is painfully slow and it is a turn off for our support.

In the future, if you do need to request for support, please get the authentication issues fixed as this will speed up our support.
·
Sunday, 06 September 2015 14:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Mark, I also noticed this on my end. Will need to figure out what might have gone wrong though. If you have any idea, appreciate it if you could share that with me. Thanks again!
·
Monday, 07 September 2015 12:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Mark,

I have changed my configuration.php file as a work around for now until I am able to identify the exact issue. You only need to login to the back-end and use the same browser to open the front-end, or vice versa.

Could you also let me know what has been changed in ED, so that I can make a note for future maintenance?

Thanks!
·
Monday, 07 September 2015 13:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Mark and Arlex,

Thanks for all the help! Categories are being displayed in the correct order now.

I am still having problems with Tags though. Could you please help fix that as well?

Best regards.
·
Monday, 07 September 2015 19:19
·
0 Likes
·
0 Votes
·
0 Comments
·
I am not really sure what issues do you have with your tags but if this is a different issue than the sorting, please start a new thread
·
Tuesday, 08 September 2015 00:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Mark, it is the same sorting issue. Tags are also shown in a descending order, even though I had chosen ascending. Thanks!
·
Tuesday, 08 September 2015 02:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Can you please start a new thread instead?
·
Tuesday, 08 September 2015 04:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi, Mark, will start a new thread for this.
·
Thursday, 10 September 2015 13:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. We will look at your new thread shortly. I will close this thread.
·
Thursday, 10 September 2015 16:05
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post