We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49261
    • 18 Posts
    Hey All,

    Thanks for everyone who contributes to the forums. It's been an amazing wealth of knowledge, and has enabled me to create things online that I never thought were so possibly easy.

    I'm having a problem with getPage. I'm using it to retrieve resources for a blog, but I'm getting a blank second page (and third page, and so on), even though I have more resources under that parent.

    A regular getResources debug thing returns everything that I need.

    Here's my call:

    [[!getPage@blogposts?
        &limit=`5`
        &element=`getResources`
        &resources=`-17`
        &includeContent=`1`
        &parents=`12`
        &tpl=`blog-listing`]]


    The only thing that has changed in the property set are the prev and next tpl's. I've attached a screen shot.


    My guess is that it has something to do with the pretty urls? The website is
    shanewall.com/blog


    Thanks for all your help.
    • I can confirm that getPage works fine with friendly urls - have a bunch of sites running that without a problem. Other than that, I'm not entirely sure what's going wrong there.. your snippet call looks good, and the paginated url looks as expected to me too. :/
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 49261
        • 18 Posts
        Thanks Mark for your input. I really appreciate it.

        I figured out the issue: the page that I was using was cacheable. I disabled it in the page's settings, and all was well with the world.

        Cheers!
        David
        • Hmm you definitely want your pages cacheable though. That's why MODX has the exclamation marks on tags, so you can be specific about what parts you don't want cached. Bypassing the cache entirely is not recommended.

          Maybe though that indicated an issue with the cache? Have you tried clearing out the entire core/cache/ folder via (s)FTP?
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
            • 49261
            • 18 Posts
            Thanks Mark— I tried clearing out the cache via FTP, and re-enabled the cache for that document, but it reverted back to the previous behavior. Strange. I'll keep digging.