Skip to content
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

Auto-generate enhanced pagination queryIDs if not specified in the markup. #55747

Open
peterwilsoncc opened this issue Oct 31, 2023 · 0 comments
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@peterwilsoncc
Copy link
Contributor

What problem does this address?

In #55719 enhanced pagination of the Query block was prevented if the queryId parameter was not set. This was to prevent a PHP notice in the event a distributed theme file contained incorrect markup.

This was suitable as a fast-follow to allow a fix to get in to WordPress 6.4 during the RC phase.

Ideally, a queryId would be auto-generated in the circumstance so themes could respect the theme developer's intent to enable enhanced pagination.

What is your proposed solution?

Autogenerate Query IDs if none is provided by the developer:

  • ensure the ID does not clash with other queryIDs on the page
  • ensure the ID is generated consistently from one page load to another (maybe via a hash of the attributes and inner content or by filtering the generated json data)
@peterwilsoncc peterwilsoncc added [Type] Enhancement A suggestion for improvement. [Block] Query Loop Affects the Query Loop Block labels Oct 31, 2023
@jordesign jordesign changed the title Auto-generate enhanced pagination queryIDs if not sepcified in the markup. Auto-generate enhanced pagination queryIDs if not specified in the markup. Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

1 participant