Thanks dev_cw for your reply.
Some modx guy already posted a bug report in march 2008 about the topic:
MySQL 5.0.51 and 51a are severely broken when a GROUP BY and ORDER BY are applied to the
same column and MODx unfortunately depends heavily on queries that do this.
Source: [10 Mar 2008 13:52] Tony Beyers (http://bugs.mysql.com/bug.php?id=35181)
By the way other cms also suffer from this problem (wordpress, etc).
OK, this is a quickfix that should work as long as you don’t have two documents in your database that have been created at the same second.
---------------------------------------------------------------------------------------------------------------
- Attention: This is a hack. Don’t use it in a productive environment until a few of us fearless daredevils say it’s ok -
---------------------------------------------------------------------------------------------------------------
Search through your modx installation and find lines where
GROUP BY sc.id
appear.
Try:
GROUP BY sc.createdon
instead.
Among those files with "Group By sc.id" inside you have to change at least these two
wayfinder.inc.php
- line 351
nodes.php
- line 104
Voila, wayfinder as well as the document tree behave like expected!
There are other occurrences of "GROUP BY sc.id" in modx (see below), but before I recommend anyone to change them too, I need to have a closer look (something I can’t do right now, too busy...)
document.parser.class.inc.php
- line 1328, 1355, 1385, 1416
ditto.class.inc.php
lines 915, 983
Regards,
pepebe