We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11186
    • 38 Posts
    I'm having a strange problem that I just can't seem to put my finger on. After updating from Revo 2.2.12 this problem began, though I'm not sure if I updated getResources and getPage at that time. I probably did.

    Anyway, using the call below in a blog template works as it always has, but after the recent upgrade a client posted a new article to the blog and it caused one of the columns on the page to shrink. I've traced it to the limit param below, and here is where it gets weird.

    - Set the limit to 0, the page looks fine.
    - Set the limit to 12, the page looks fine.
    - Set the limit to 10, the column width shrinks by about 200px.
    - Set the limit to 5, the column shrinks by an additional 200px (400px total roughly).

    Leaving the limit as it was at 10, and clicking page 2 in pagination, page 2 renders fine. If I set the limit to 5, page 1 shrinks, page 2 shrinks a little less, and page 3 is fine. It seems to cascade through the pagination the lower the limit is set.

    I can't figure it out. No new html is being added, except the pagination nav. So I thought, I'll just remove the pagination nav. Still the same problem. Removed pageVarKey, still same problem. So I copied the html output of posts on the broken page from the page source, into the template directly, problem went away. It only seems to happen when I pass it through getPage?

    How could getPage possibly alter the width of columns if it does not add any new html? I'm so confused.


    • MODX Version:Revolution 2.2.13-pl (advanced)
    • PHP Version:5.2.11
    • Database (MySQL, SQL Server, etc) Version:MySQL 5.1.40

    getpage-1.2.4-pl
    getresources-1.6.1-pl
    [[!getPage?
    &elementClass=`modSnippet`
    &element=`getResources`
    &parents=`12,13,14`
    &depth=`1`
    &limit=`10`
    &pageVarKey=`page`
    &includeTVs=`1`
    &includeContent=`1`
    &tpl=`tplBlogPost`
    ]]

    [[!+page.nav:notempty=`
    <div class="paging">
    <ul class="pageList">
    [[!+page.nav]]
    </ul>
    </div>
    `]]

    This question has been answered by Bruno17. See the first response.

    [ed. note: grabenfub last edited this post 12 years, 6 months ago.]
      • 4172
      • 5,888 Posts
      any link, where we could see it live?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 11186
        • 38 Posts
        Sure, but I don't want to leave it broken for too long. I'll set the limit to 10 for a bit so you can see what's happening. If you go to the second page via pagination everything looks as it should for a comparison.

        This has worked just fine for over a year. It only started with the recent round of updates. [ed. note: grabenfub last edited this post 12 years, 6 months ago.]
        • discuss.answer
          • 4172
          • 5,888 Posts
          Seems this has todo with only short texts at the first page.
          As soon as I add a bit more text in the firebug-console to one of the items, the divs get longer.

          I would say, this has nothing todo with the upgrade, but with short texts in all newer articles.

          So, a CSS - issue.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 11186
            • 38 Posts
            Kick arse thanks. I'll try it out. I spent over 8 hours in firebug yesterday and didn't think to even try that.

            EDIT: That were it. Thanks again. Sorry to be a bother. [ed. note: grabenfub last edited this post 12 years, 6 months ago.]