Hello,
Wayfinder seems to be sorting on document id not menu index. I am just using the basic [[Wayfinder? &startId=`0`]] call. I have also added an explicit &sortBy=`menuindex` and tried [!..!] calls with nothing changing the ordering of the menu items.
Am I missing a step or a parameter somewhere?
Thanks!
Hmmm 20 minutes later and the menu sorted itself... will have to keep an eye on it to see if anything changes.
I’m having exactly the same problem. I’m using a vertical menu and all was OK for a couple of days and then it suddenly started to order by document id instead of menuindex. I have been editing the call to Wayfinder, but I edited nothing that I thought might cause this (only the call to Wayfinder in my main template and the Wayfinder templates)..
I have tried &sortBy=`menuindex` too, but to no avail.
Does anyone know what the solution is to this?
Timmer, did you find out what caused this, or have you had the problem recur?
Cheers,
Gav
Hi Gav,
Unfortunately, it hasn’t stopped sorting so I have no clue what caused it originally. I would say it was a caching issue but even the management view wasn’t sorting and now it is and has been since then.
Sorry, that probably doesn’t help any.
-
☆ A M B ☆
- 24,524 Posts
The only thing I am aware of that can cause this is the buggy version of MySQL (5.0.51); it is possible that hosting companies upgraded to this version without any notification. I believe a certain upgrade to CPanel used that version, and hosts have been scrambling ever since to upgrade or downgrade the MySQL to a version that doesn’t have that bug (something to do with queries having both GROUP BY and ORDER BY).
So your host may have upgraded, realized the problem, and either upgraded again or downgraded to get rid of it.
Thanks for your replies folks.
I am indeed running MySQL version 5.0.51b-community-nt, so that may be the problem!
I tried running the above query against the MODx database for my site and, as expected, it fails because of the quotes around ’menutitle’. Removing the quotes, the query returns the correct results but in the wrong order (ordered by id). Changing "menutitle" to "menuindex" brings back the same results, again ordered by id.
If I then remove the "GROUP BY sc.id" line, I get the correct results - ordered by menuindex.
I am going to look and see if it is feasible to alter this statement in the wayfinder.config.php file...
If that doesn’t work I’ll try changing my MySQL version...
Cheers
Gav
-
MODX Staff
- 10,725 Posts
The problem is MySQL 5.0.51, period. It’s a major bug and making that hack will work only if you do not have pages assigned to multiple document groups. In that case, removing the group by will cause you to get duplicate data.
Thanks OpenGeek,
I think I will just go ahead and update my version of MySQL,
Gav
I’ve just encountered this problem as well.
I recently installed wamp that has 5.0.51b and started working on a project. How to do I change the sql version? I tried to install wamp with sql 5.0.45 over the top of my existing install.
The wamp menu now shows two version of sql. However, when I select the down level version and try to bring up my site, I get a modx parse error, failed to select the database.
I have no clue how to approach this.
I appreciate any help. Thanks.
Terry
www.terrybarthdesign.com