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>
`]]
[ed. note: grabenfub last edited this post 12 years, 6 months ago.]