Opened 3 years ago
Closed 19 months ago
#59809 closed defect (bug) (duplicate)
Inconsistent "ITEMS PER PAGE" across pagination pages in the Query Loop
| Reported by: | rajinsharwar | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
There is an inconsistent behavior of the "ITEMS PER PAGE" across pagination pages in WP 6.4 and TT4 the Query Loop block.
Here is how to replicate it:
- Ensure you have WP 6.4-RC3 installed, and the TT4 activated.
- Ensure you have at least 10 blog posts.
- Make a certain blog post sticky.
- Navigate under Appearance > Editor, and edit any template.
- In the template, add the Query Loop block, and choose a pattern that has pagination on it.
- Disable the "Inherit query from template", and ensure the "STICKY POSTS" is set to include. Also, ensure the "ORDER BY" is set to "Newest to Oldest"
- From the "Display Settings" of the block, set the "ITEMS PER PAGE" to 2.
- Save the changes, and come back to the frontend.
- You will see that it shows 3 posts in the Query Loop, which is expected as it includes the Sticky post as well.
- Now, navigate to the 2nd page using the pagination. See, now you will see 2 posts. This includes the STICKY post and another post.
- Now, navigate to the 3rd page using the pagination. See, now you again have 3 posts showing, which is expected.
This is causing an issue with the 2nd page of the pagination, which is only showing 2 posts, including the Sticky one. But all the other pagination pages are showing fine, with 3 posts each, including the Sticky one. This is occurring in WP 6.4 and with the TT4 theme.
Change History (11)
This ticket was mentioned in Slack in #core-editor by rajinsharwar. View the logs.
3 years ago
#3
@
3 years ago
Hi @peterwilsoncc, thanks for checking on this. This video might help you replicate it.
https://somup.com/c0X1IZgQIH
Here are the Unit Tests dummy posts for your reference: https://github.com/WordPress/theme-test-data/blob/master/themeunittestdata.wordpress.xml
Please make sure there is only one post made as Sticky.
#4
@
3 years ago
- Keywords reporter-feedback added
@rajinsharwar is this issue only with 6.4 and TT4? Have you also tested it on 6.3.2 and/or with TT3?
#5
@
3 years ago
Yeah, in TT3 and WP 6.3.2, there is also an issue with pagination but its different. There I found many pages to have inconsistent behaviour, but with TT4, its either the 1st page or the 2nd page.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#7
@
3 years ago
- Keywords reporter-feedback removed
- Version trunk
Thanks @rajinsharwar for confirming the issue you're seeing predates 6.4.
I'm removing trunk as the Version.
#8
@
3 years ago
Following the testing instructions, I too was unable to reproduce the reported issue with 6.4 RC3 and TT4. I'll follow-up later with a proper test report to share my findings.
#9
@
3 years ago
As the reported issue was not introduced in 6.4, this report is not a blocker for 6.4.0 release.
#10
@
3 years ago
- Component Bundled Theme → Query
- Summary Inconsistent "ITEMS PER PAGE" across pagination pages in WP 6.4 and TT4 for the Query Loop → Inconsistent "ITEMS PER PAGE" across pagination pages in the Query Loop
This happens with the query loop block in both classic themes and block themes.
This is a not a problem with the bundled themes, so I am going to remove it from the bundled theme component.
There are similar issue already reported, but I did not find an exact match.
#11
@
19 months ago
- Milestone Awaiting Review
- Resolution → duplicate
- Status new → closed
Duplicate of #50989.
Hi
I have tested this again and its not a problem with the query loop block.
The same happens with a regular query, and I think this is intended because as already commented above, the sticky post is moved from its regular position in the query.
I am closing this ticket, and conversation can continue in 50989 where there is a longer discussion already.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@rajinsharwar Thanks for the report.
I am having trouble reproducing the issue, these are the steps I followed:
wp site empty wp post generate ## Make sure post ID matches number for i in {1..100}; do wp post update $i --post_title="Post $i"; done;Are you able to provide any steps that I am missing? Feel free to upload screen shots if that will be easier.