As requested
here, I’m posting this here.
[!Ditto? &parents=`6` &depth=`1` &tpl=`testimonial` &orderBy=`menuindex` &sortDir=`ASC` !]
I’m getting a MySQL error, and my server is running 5.0.67-community.
If I remove the orderBy parameter it works okay, and I end up with the result I want (results in order of creation, ascending). But I’d like to know why this is happening and if there’s anything I can do to stop it as I may need to customise the order in the future.
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'menuindex' at line 4 »
SQL: SELECT DISTINCT sc.pagetitle,sc.description,sc.content,sc.published,sc.id FROM `abacus_modx`.`modx_site_content` sc LEFT JOIN `abacus_modx`.`modx_document_groups` dg on dg.document = sc.id WHERE sc.id IN (19,20,21,22,23,24,25,26,27,28,29,30,31,32) AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) GROUP BY sc.id ORDER BY sc.createdon ASC, sc.id menuindex
To me, it looks like the query really is at fault (why are two other fields in ORDER BY at the end?) - could this be a bug in Ditto? I have MODx 0.9.6.3 and Ditto 2.1+.
Thanks.