We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27302
    • 154 Posts
    I can’t get pagination to work properly after landing on a Tag Landing page. All other pagination on the site works correctly. But the one from my Tag landing page does not.
    <div class="catdiv">
    [[Ditto?parents=`21`&depth=`2` &tpl=`DittoCats` &sortBy=`pagetitle` &sortDir=`asc` &paginate=`1` &summarize=`6` &tagData=`myTags` &tagDelimiter=`, `]]
    </div>
    <div class="ditto_stats righttext">
    Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong>
    <div id="ditto_pages">
    [+previous+] [+pages+] [+next+]
    </div>
    </div>
    


    The page displays correct matches for the tags, but I just can’t get it to display anything past page 1.
    When I hover over, for example Page 2, the link shows as "keyword-results.html?tags=adrenaline&amp;start=0&amp;start=6"

    However with other pages on the site that use pagination the Page 2 link shows as something like;
    "water-based-activities.html?start=6"

    Where is the extra "&amp;start=0" in the Page 2 link on my keyword-results.html page coming from?

    The call to go to the landing page is as follows;
    [[Ditto?documents=`81` &depth=`1` &tagData=`myTags` &tagDelimiter=`, ` &tpl=`DittoKeywords` &tagDocumentID=`190`]]
    


    It seems that there might be an issue with the way that "&documents" is called on the initial page, while "&parents" is called on the landing page. I need the "&documents" call on the initial page because I need it to display the tags for the page the user is on at the time.

    I’m using ModX 0.9.6 and Ditto 2.02.
      • 18397
      • 3,250 Posts
      The issue definitely lies in the two conflicting &start entries. I’ll create a test case on my server and look into this..
        • 27302
        • 154 Posts
        Excellent, thanks Mark. smiley
          • 27302
          • 154 Posts
          An update to the issue. Calling [*id*] from within a template works. However if I make the [*id*] call from within a document I get the SQL error mentioned above.
            • 20682
            • 31 Posts
            I have been roaming the forums about this very problem! It’s driving me mad shocked

            I can’t even click the debug and have it work properly sad

            From my source code you can see the extra partial html entity:

            /cms/index.php?id=2&amp;amp;ditto_debug=open

            This is the case in the debug links, tag links and pagination links.

            If there is anything I can do to help this fix along let me know!

            Oh and this is from the summary ditto call on the parent page.

            Not only can i not get to the next page or any tag calls, it also adds the get variables from the last link to the current link as the first poster indicated.
              • 20682
              • 31 Posts
              I seem to have solved my pagination and tagging problem. In ditto.class.inc.php, buildUrl function I changed this:

              return str_replace("&","&",$url);


              to this:

              return $url;


              by making the change the urls no longer contain html entities and the get variables do not stack together. The pagination works and I can narrow my results by tags! Yahoo!! grin grin

              Sheri