Why won't Ditto/Wayfinder sort properly?

This question is asked so often on the MODx forums that I created this page so I wouldn't have to keep typing in the answer.

MySQL version 5.0.51 has a bug related to sorting that has bitten a number of CMS platforms. In Wayfinder, the menu index is ignored, in Ditto, things aren't always sorted the way you want them to be. Generally, the items are sorted by document ID. This means that they end up being displayed in the order they were created rather than however you specified in your snippet call.

There are essentially three solutions:

  • Get your host to update the MySQL version to at least 5.0.52.
  • Recreate the documents in the order you want them to appear. This can be done by duplicating them all in the correct order, deleting the originals, and renaming them to the original names.
  • Go into the snippet code, find the MySQL query statement, and remove the "GROUP BY" clause. This is what I've done while waiting for a MySQL upgrade.

Thank you for visiting BobsGuides.com

  —  Bob Ray