recently I noticed some incorrect sorting on my site. Doc that were supposed to be sorted by pagetitle have now some chaotic order. Both throught snippet rendering and in manager doctree. Most of entries are cyrillic but believe me - no order.
Will investigate it deeper.
UPD: phpMyAdmin sorts pagetitle fields in same chaos. Guess thats a DB issue. But how this happened?
-
MODX Staff
- 10,725 Posts
Sorting of character fields in MySQL is completely dependent on the collation sequence that is applied to a field. There are generally many collation sequences for each encoding, many which are case-insensitive, and many which are not. What collation sequence are you using with MODx? (NOTE: this is set by default in MySQL to something like latin1_swedish_ci, and the MODx installation would use whatever collation sequence was set for the database container, if it already existed, or for the entire installation if it didn’t)
The collation seqs are new to me and maybe I should dig into them... But a week ago when I developed that paticular snippet (showing artist roster) everything was ok. First went the latin-character-named-artists and then cyrillic-named-artists. Everyone in proper alphabetic order. Now something happened... I remember a DB malfunction after which I had to repair it. Guess that was the moment for the order error.