We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19004
    • 33 Posts
    I’m trying to sort by pagetitle using ditto, and it is decidedly not doing that. Here is the call that I’m doing:

    [!Ditto? &startID=`5` &tpl=`FighterIndex` &tplAltRows=`FighterIndexAlt` &summarize=`25` &paginate=`1` &paginateAlwaysShowLinks=`1` &filter=`tvfighter_active,1` &hiddenTVs=`fighter_active` &sortBy=`pagetitle` &sortDir=`ASC` !]

    If I remove the &sortBy=`pagetitle` the order changes, so I know it is at least recognizing that I am trying to sort, but the effective sort order appears to be random, or at least decidedly not alpha. Just to show you what I mean, here is a link to my page:

    http://www.theextremefight.com/index.php?id=5

    I have verified that the first column in that table refers to pagetitle in the FighterIndex and FighterIndexAlt chunks, so that is not the issue.

    Any Ideas?

    P.S. I’m using Ditto 1.02
      • 19004
      • 33 Posts
      no comments at all?
        • 18397
        • 3,250 Posts
        Please append &debug=`1` to your call and post here.
          • 19004
          • 33 Posts
          Well the results were really long, so I grabbed the top and the first few results:

          NOTE: At first glance they might appear to be in order, but notice that Josh comes before John, etc.

          Number supposed to be summarized (summarize): 25

          Total supposed to be returned: 23
          Count of total in db: 23
          Sort by (sortBy): pagetitle
          Sort direction (sortDir): ASC
          Using the new MODx 0.9.2.1 API
          TVs: fighter_active, fighter_mma_record, fighter_height, fighter_weight, fighter_active,fighter_active
          Start at 0 and stop at 23 out of 23

          Document Data for "Justin Torrey"
          [+id+] => 28
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Justin Torrey
          [+longtitle+] => Justin Torrey
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169753202
          [+editedby+] => 1
          [+editedon+] => 1169759029
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169753244
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’11.5
          [+tvfighter_weight+] => 184.5
          [+tvfighter_mma_record+] => 5-0-0
          [+tvfighter_active+] => 1
          [+title+] => Justin Torrey
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 25-Jan-07 13:26
          tpl = FirstRow -> <tr class="odd"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "Josh Spearman"
          [+id+] => 30
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Josh Spearman
          [+longtitle+] => Josh Spearman
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169755977
          [+editedby+] => 1
          [+editedon+] => 1169838325
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169755992
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’4
          [+tvfighter_weight+] => 124
          [+tvfighter_mma_record+] => 5-9-0
          [+tvfighter_active+] => 1
          [+title+] => Josh Spearman
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 25-Jan-07 14:12
          tpl = AltRows -> <tr class="even"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "John Benoit"
          [+id+] => 34
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => John Benoit
          [+longtitle+] => John Benoit
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169760823
          [+editedby+] => 1
          [+editedon+] => 1169760838
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169760838
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’10
          [+tvfighter_weight+] => 180lbs
          [+tvfighter_mma_record+] => 0-0-0
          [+tvfighter_active+] => 1
          [+title+] => John Benoit
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 25-Jan-07 15:33
          tpl = -> <tr class="odd"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "Joe Kirkpatrick"
          [+id+] => 41
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Joe Kirkpatrick
          [+longtitle+] => Joe Kirkpatrick
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169864207
          [+editedby+] => 1
          [+editedon+] => 1169864224
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169864224
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’8
          [+tvfighter_weight+] => 144lbs.
          [+tvfighter_mma_record+] => 0-0-0
          [+tvfighter_active+] => 1
          [+title+] => Joe Kirkpatrick
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 26-Jan-07 20:16
          tpl = AltRows -> <tr class="even"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "Mark Matheson"
          [+id+] => 35
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Mark Matheson
          [+longtitle+] => Mark Matheson
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169761119
          [+editedby+] => 1
          [+editedon+] => 1169761128
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169761128
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’9
          [+tvfighter_weight+] => 165lbs
          [+tvfighter_mma_record+] => 2-3-0
          [+tvfighter_active+] => 1
          [+title+] => Mark Matheson
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 25-Jan-07 15:38
          tpl = -> <tr class="odd"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "Nick "Nicki Spandex" Corrigan"
          [+id+] => 13
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Nick "Nicki Spandex" Corrigan
          [+longtitle+] =>
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 0
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169002527
          [+editedby+] => 1
          [+editedon+] => 1169931649
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169043807
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’6
          [+tvfighter_weight+] => 135lbs-144.9lbs.
          [+tvfighter_mma_record+] => 0-0-0
          [+tvfighter_active+] => 1
          [+title+] => Nick "Nicki Spandex" Corrigan
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 16-Jan-07 20:55
          tpl = AltRows -> <tr class="even"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "Thiago Rizzo"
          [+id+] => 32
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Thiago Rizzo
          [+longtitle+] => Thiago Rizzo
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 0
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169759812
          [+editedby+] => 1
          [+editedon+] => 1169759823
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169759823
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’7
          [+tvfighter_weight+] => 165lbs
          [+tvfighter_mma_record+] => 2-0-0
          [+tvfighter_active+] => 1
          [+title+] => Thiago Rizzo
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 25-Jan-07 15:16
          tpl = -> <tr class="odd"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>

          Document Data for "Sean Ratcliff"
          [+id+] => 31
          [+type+] => document
          [+contentType+] => text/html
          [+pagetitle+] => Sean Ratcliff
          [+longtitle+] => Sean Ratcliff
          [+description+] =>
          [+alias+] =>
          [+link_attributes+] =>
          [+published+] => 1
          [+pub_date+] => 0
          [+unpub_date+] => 0
          [+parent+] => 5
          [+isfolder+] => 0
          [+introtext+] =>
          [+richtext+] => 1
          [+template+] => 5
          [+menuindex+] => 1
          [+searchable+] => 1
          [+cacheable+] => 1
          [+createdby+] => 1
          [+createdon+] => 1169758605
          [+editedby+] => 1
          [+editedon+] => 1169758998
          [+deleted+] => 0
          [+deletedon+] => 0
          [+deletedby+] => 0
          [+publishedon+] => 1169758639
          [+publishedby+] => 1
          [+menutitle+] =>
          [+donthit+] => 0
          [+haskeywords+] => 0
          [+hasmetatags+] => 0
          [+privateweb+] => 0
          [+privatemgr+] => 0
          [+content_dispo+] => 0
          [+hidemenu+] => 0
          [+tvfighter_height+] => 5’7
          [+tvfighter_weight+] => 155lbs
          [+tvfighter_mma_record+] => 2-0-0
          [+tvfighter_active+] => 1
          [+title+] => Sean Ratcliff
          [+summary+] =>
          [+link+] =>
          [+author+] => Built-in Administration account
          [+date+] => 25-Jan-07 14:56
          tpl = AltRows -> <tr class="even"> <td><a href="[~[+id+]~]">[+pagetitle+]</a></td> <td>[+tvfighter_mma_record+]</td> <td>[+tvfighter_height+]</td> <td>[+tvfighter_weight+]</td> </tr>
            • 18397
            • 3,250 Posts
            Try Ditto 1.1b2 in the "In Development" Forum