We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10480
    • 9 Posts
    Sorry if this has been answered before but I have been searching for an answer forever.

    I am running Modx 9.6 and Ditto 2.1.

    I am trying to get Pagination to work but the placeholders get stripped out. I have already tried cached, uncached, and everything else I can think of. I turned on the PHx logging and this is what I get.

    35 [16:47:54] MODx / PHx placeholder variable: test_current
    36 [16:47:54] |--- Skipping - hasn’t been set yet.
    37 [16:47:54] MODx / PHx placeholder variable: test_total
    38 [16:47:54] |--- Skipping - hasn’t been set yet.
    39 [16:47:54] MODx / PHx placeholder variable: test_previous
    40 [16:47:54] |--- Skipping - hasn’t been set yet.
    41 [16:47:54] MODx / PHx placeholder variable: test_pages
    42 [16:47:54] |--- Skipping - hasn’t been set yet.
    43 [16:47:54] MODx / PHx placeholder variable: test_next
    44 [16:47:54] |--- Skipping - hasn’t been set yet.
    45 [16:47:54] MODx / PHx placeholder variable: test_start
    46 [16:47:54] |--- Skipping - hasn’t been set yet.
    47 [16:47:54] MODx / PHx placeholder variable: test_stop
    48 [16:47:54] |--- Skipping - hasn’t been set yet.
    49 [16:47:54] Cleaning unsolved tags:
    test_current
    test_total
    test_previous
    test_pages
    test_next
    test_start
    test_stop

    If anyone can help I would greatly appreciate it. If I can get this figured out I will be happy with Modx. Let me know if I can provide more details.
      • 7231
      • 4,205 Posts
      what does the Ditto call look like? Did you activate the pagination &paginate=`1`? !f you are using PHx in your Ditto Tpl you need to set &phx=`1` in the Ditto call.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 10480
        • 9 Posts
        That did not work. Sorry I didn’t post the ditto call here it is with the phx added:

        [!Ditto? &parents=`3` &id=`test` &display=`5` &total=`20` &depth=`2` &extenders=`summary` &paginate =`1` &paginateAlwaysShowLinks=`1` &tpl=`DittoTemplate` &phx=`1`!]

        Also here is just some of the place holders I was trying to use.

        Page [+test_current+] of [+test_total+] Articles [+test_previous+] [+test_pages+] [+test_next+] [+test_start+] [+test_stop+]

        I have this right under the Ditto call in the template.

        I have also tried disabling the PHx plugin but that did not work either.
          • 7231
          • 4,205 Posts
          Try it with [+pages+] rather than [+test_pages+]. Are you including the id because you have more than one ditto call on the page? Otherwise it is not needed.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 11975
            • 2,542 Posts
            Hi,

            this in a known bug of PHx plugin.
            To make it work:
            - uncache the page
            - call ditto cached.

            :-)
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 10480
              • 9 Posts
              I just put in the id to try something else. I took out the id though and still have the same results. What file would normally tell modx how to fill the parameters? Is it the ditto snippet itself?

              I have also tried loading the page uncached and the ditto call cached. I have read many posts on that. I will try again though.
                • 10480
                • 9 Posts
                Ok. Tried changing the caching setup and still nothing. sad
                  • 11975
                  • 2,542 Posts
                  this is weird
                  I’m using this settings all the time succesfully.

                  As the ditto call is cached PHx (executes the snippet call) so it knows them and do not skip them.

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 10480
                    • 9 Posts
                    I know a lot of people are using the exact settings that I am, which is so frustrating. Again this is my current Ditto call:

                    [[Ditto? &parents=`3` &display=`5` &total=`20` &depth=`2` &extenders=`summary` &paginate =`1` &paginateAlwaysShowLinks=`1` &tpl=`DittoTemplate` &phx=`1`]]

                    I have this in a template, then I have a page that I call uncached that uses the template.

                    In the system events though, PHx logs this "MODx Chunks -> Merging all chunk tags", it used to see the different [+page+] and other placeholders and say that it could not fill them.

                    Modx 9.6, Ditto 2.1, PHP 5
                      • 10480
                      • 9 Posts
                      Anyone have any idea’s? I guess it’s time to uninstall Modx and go to something like Joomla maybe.