We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2901
    • 277 Posts
    Hi all

    I have a strange sorting problem with Ditto. I have a TV "sortOrder" of type number. The individual documents are numbered 10, 20 and so on and I call it with

    [[Ditto? &startID=`24` &summarize=`10` &tpl=`dittoGallery` &paginate=`1` &extenders=`summary,dateFilter` &view_gallery=`[+id+]` &paginateAlwaysShowLinks=`1` &language=`german` &orderBy=`sortOrder` &sortDir=`DESC`]]


    The site is in three languages. I first produced the german site and then copied the site tree twice. However, that call works in the german section but not in the oder languages. I use this call in a news site as well as on the index. The documents are all set to uncached. this is the site http://www.steck.ch.
    Your help is much appreciate it.

    Thanks
    Beat
      • 2901
      • 277 Posts
      Hi all

      I have now changed the call from
      &orderBy
      to
      &sortBy
      which works for me now. However in the documentation it say’s
      &orderBy
      On Two pages I have now used
      &orderBy
      in all the others I had to change it.

      Frank if there is a good answer to this one I would like to know it.

      Thanks
      Beat
        • 25663 MODX Staff
        • 12,272 Posts
        Sounds like you’re running MySQL 5.0.51, which has a known bug with grouping/sorting.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 2901
          • 277 Posts
          Hi Ryan

          nope it is 5.0.45 but there must be the same problem. Guess I will have to talk to my provider then.

          Thanks
          Beat
            • 25663 MODX Staff
            • 12,272 Posts
            You might have a different PHP client to the MySQL binary. It sure sounded like that was the cause. Now that I re-read your post, what’s the content of [*sortOrder*] in your ones that didn’t work? If you created them by cloning your starting point, they probably didn’t clone the TV values.

            Why not use the built in menu index for sorting?
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 2901
              • 277 Posts
              I reenter the value in the clones. however the client wanted a manual way to sort his entries. the content of the "sortOrder" are numbers like 10, 20 ans so on.

              even reentering the values did not solve the problem. the php version of my server is 5.1.6.