We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20765
    • 90 Posts
    myfriendscallmebill Reply #1, 18 years, 10 months ago
    MY PROBLEM

    When friendly URLs are *off*, pagination works fine. But when I turn friendly URLs *on*, each time I click a link in the page selector the page refreshes to show the same (initial) list of docs, and the same (initial) link in [+pages+] has the ’.ditto_currentpage’ class.

    Can anyone help me?


    BACKGROUND INFO

    My development system:
    MacOS X v10.4.11
    MAMP Pro v1.6
    PHP v5.2.1
    MySQL v5.0.37

    MODx v0.9.6
    Ditto v2.0.2
    PHx v2.1.3

    My template contains:
    <base href="[(site_url)]" />

    My Ditto pagination HTML:
    <div class="ditto_pageList"><nobr>[+pages+]</nobr></div>
    <p>&nbsp;</p>

    My Ditto call:
    <div class="docList">
    [[Ditto? &parents=`20` &depth=`1` &filter=`` &display=`all` &sortBy=`custom_date` &dateSource=`custom_date` &dateFormat=`%B %d, %Y` &sortDir=`DESC` &noResults=`At present there are no documents available for display.` &tpl=`docList_dittoTpl` &paginate=`1` &summarize=`10` &paginateAlwaysShowLinks=`1`]]
    </div>

    Because I have PHx installed, I’m calling Ditto cached, and have the page uncached.

    Friendly URL settings:
    prefix = ""
    suffix = ".html"
    use friendly aliases = yes
    use friendly path = yes

    (.htaccess has been configured so that friendly URLs work in general across the site)

    The [+pages+] placeholder generates page links in this format:
    <span class="ditto_currentpage">1</span>
    <a class="ditto_page" href=’/test/root/news/docs.html?start=10’>2</a>
    etc.

    (where ’/test/’ is the root directory of the MODx site.)
      • 18397
      • 3,250 Posts
      A few things you can try or test:
      A) Turn PHx off, change the call to uncached, and clear your cache.
      B) Give Ditto 2.1b3 a try
      C) Clear your cache after viewing the ditto call. Then, before viewing another page, click on the page 2 link.

      Let me know what happens when you try the above.
        • 20765
        • 90 Posts
        myfriendscallmebill Reply #3, 18 years, 10 months ago
        Mark, thanks for your reply.

        Quote from: Mark at Nov 28, 2007, 01:42 AM

        A) Turn PHx off, change the call to uncached, and clear your cache.

        Done. This produced no change in behavior.

        After the above, I then changed the page from uncached to cached and tried again. This also produced no change in behavior.

        Quote from: Mark at Nov 28, 2007, 01:42 AM

        B) Give Ditto 2.1b3 a try

        Done. This produced no change in behavior.

        Quote from: Mark at Nov 28, 2007, 01:42 AM

        C) Clear your cache after viewing the ditto call. Then, before viewing another page, click on the page 2 link.

        I did the above each time I made a change. Still no change in behavior.

        I don’t know if it’s a meaningful clue, but when I turn debug on, and click the debug link; when the debug window is shown it fills with a copy of the page I’m having trouble with -- not with the debug display.

        Finally, after turning PHx off and upgrading to Ditto 2.1b3, turning FURLs off makes page selection work.

        Anything else I can try?
          • 18397
          • 3,250 Posts
          Does it work with PHx on, Ditto 2.1b3, and FURLs off?
            • 20765
            • 90 Posts
            myfriendscallmebill Reply #5, 18 years, 10 months ago
            Quote from: Mark at Nov 28, 2007, 07:06 PM

            Does it work with PHx on, Ditto 2.1b3, and FURLs off?
            Yes it does. When I turn FURLs off, both pagination and the display of the debug panel work correctly. When I turn FURLs on, the pager appears but doesn’t cause pages to switch, and clicking the Debug link opens a window with another copy of the current page (rather than the debugger).
              • 25663 MODX Staff
              • 12,272 Posts
              Do you have the following in your template header:

              <base href="[(site_url)]"></base>

              update: ignore me ... it does
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 20765
                • 90 Posts
                myfriendscallmebill Reply #7, 18 years, 10 months ago
                Mysteriously, paging has started to work on our production site with FURLs turned on, but it still don’t work on our development site (on an entirely different server than the one first described in this thread) with FURLs turned on.

                This kind of mystery worries me, because I might unknowingly re-introduce the condition that caused this problem.
                  • 18397
                  • 3,250 Posts
                  This is really odd. I’ve been unable to replicate the issue using MAMP with both MODx 0.9.6 and 0.9.6.1. Does the issue also occur with this call?

                  [[Ditto? &parents=`20` &depth=`1` &display=`all` &paginate=`1` &paginateAlwaysShowLinks=`1`]]
                  
                    • 20765
                    • 90 Posts
                    myfriendscallmebill Reply #9, 18 years, 10 months ago
                    Mark--

                    That call does what I’d expect (with or without FURLs): lists all 65 of my documents on one page, and creates a pager ( [+pages+] ) with only one page.

                    If I add the parameter &summarize=`10`, then it displays a list of 10 documents, and the pager lists seven pages. But clicking on page numbers does not cause it to flip to the next set of 10 docs.
                      • 36416
                      • 589 Posts
                      Quote from: myfriendscallmebill at Dec 02, 2007, 01:29 AM

                      If I add the parameter &summarize=`10`, then it displays a list of 10 documents, and the pager lists seven pages. But clicking on page numbers does not cause it to flip to the next set of 10 docs.

                      Does it work when you call it uncached: [!Ditto...!] ?