We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6756
    • 12 Posts
    howdy, i cant get my articles to change the sort direction at all. im using the following to call with ditto 1.02 and modx 0.9.2.1 and it sorts in ACS so the recent articles are at the bottom in the archive.

    [!Ditto? &startID=`1` &summarize=`4` &sortBy=`createdon` &sortDir=`DESC` !]

    changing DESC to ASC does nothing. changing createdon to pub_date lists all the articles in the same way but changes the date to the same date -the unix time stamp date minus my offset time in 1969 (weird) even though i have unpublished and republished my articles - it still sorts in the same way ascending.
      • 18397
      • 3,250 Posts
      Hmmm. The second report of this and yet I am still unable to reproduce it on any of my test servers... Can you add this line just before the last line:

      var_dump($ditto->advancedsort);
      


      Post back with what it reports.
        • 6756
        • 12 Posts
        thnx for your response

        string(3) "off"

        was at the top. for your information using the [!NewsListing? &startID=`1` &summarize=`4` !]
        snippet sorts them in the order the articles are presnted in the left hand window not by created date or published date at all. i noticed this first in 0.9.1 could not fix it and upgraded to 0.9.2.1 and am trying to get Ditto working without success. Formely the NewsListing sorted the articles correctly with most recent at the top.
          • 18397
          • 3,250 Posts
          Bizzare. According to that everything is working.
            • 23948
            • 15 Posts
            doesn’t work for me either, ASC and DESC have no effect.

            EDIT: this workaround (foul hack with unknown consequences) gets sort direction fixed too. it seems that advanced sorting isn’t triggering for us for some reason.
              • 18397
              • 3,250 Posts
              MARKSVIRTUALDESK Reply #6, 20 years ago
              Did you try the 1.1 beta?
                • 23948
                • 15 Posts
                just tried the beta and indeed it works fine without the hack...woohoo thanks.