We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21257 MODX Staff
    • 730 Posts
    Sorry I don’t have time to report this properly. (And, honestly, I’m a little confused about where to report this - Ditto’s Flyspray, Ditto forums, Jira?)

    When my ditto call contains the orderBy parameter,
    [!Ditto? &tpl=`ctp_summary.tpl` &orderBy=`menuindex` !]
    


    the SQL ORDER BY statement gets messed up
    SQL: SELECT DISTINCT sc.published,sc.id,sc.pagetitle FROM `po_stage`.`modx_site_content` sc LEFT JOIN `po_stage`.`modx_document_groups` dg on dg.document = sc.id WHERE sc.id IN (25,26) AND sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) GROUP BY sc.id ORDER BY sc.id menuindex
    


    Note that there is no table prefix on `menuindex` and.. should sc.id even be there?

    First time I saw this the other day, I worked around it and didn’t have time to think any more about it.
    Now that this has happened twice on recent 0.9.6.x installs from SVN, I know it’s not a fluke.

    * This might be a php 4 issue *

    If there’s no action on this in a couple of days when I’m back, I’ll dig into it further. I know releasing 0.9.6.2 is just on the horizon. If there’s a php 4 bug that all you php5 types aren’t seeing, it would not be a happy release day. (On the other hand.. hopefully I’m just doing something wrong here and am too frantic to notice.)
      Mike Schell
      Lead Developer, MODX Cloud
      Email: [email protected]
      GitHub: https://github.com/netProphET/
      Twitter: @mkschell