-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit number of items to 1 if selecting the option to use query from query string #29915
Conversation
Size Change: +37 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an e2e test failure that is related to the changes in this PR. When you load the Site Editor the Update Design
button is enabled (the entity state is marked as dirty), even though no changes have been made yet.
Thanks for pointing this out, just pushed a fix for this. |
but still failing in CI, will take another look. |
1c09f8f
to
e3833a5
Compare
Limiting the number to 1 is not the proper solution here I think. The goal would be to show the number of posts from Currently there is a specific setting in In general we need to find a way to detect the context a Query lives (page/archive) and set the |
Thanks for the feedback @ntsekouras, I am going to close this for now then, and look for another approach. |
Potential fix for #29438
Description
Currently when selecting
Inherit query from url
the query loop block still shows the default number of posts fromgetSettings().postsPerPage
orDEFAULTS_POSTS_PER_PAGE
which means the editor doesn't match the frontend where a single post/page is likely to display.How has this been tested?
Just manually currently
Types of changes
If
Inherit query from url
is toggled on sets the posts per page to 1 in order to better match what is shown in the editor to what you see in from end.Testing
Checkout PR to local dev env
Enable FSE theme
In FSE editor edit page template and add a Query block
Toggle
Inherit query from url
on and make sure only one page/posts displays in front end and editorToggle
Inherit query from url
off and make sure the default number of posts per page displays in editor and frontendChecklist: