Repository navigation
Conversation
🤖 PR meta 🤖👋 Welcome👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @elphizu! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. 🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
Synchronize the site editor loading queries and add Editor regression coverage for a published Privacy Policy page. Credit to @flynn-eye for the related query synchronization and regression coverage in WordPress#86028.
…acy-policy-preview # Conflicts: # packages/block-library/CHANGELOG.md
|
Thanks, @flynn-eye, for the related work in #86028 I'm not sure why that PR was closed, but it highlighted the matching queries in both site editors and the need for regression coverage. I've included those query updates in this PR, along with a regression test for an Editor with a published Privacy Policy page. |
What?
Closes #86019.
Restores
context: 'view'when fetching pages for the Page List block’s editor preview.Why?
Editors see “Page List: Cannot retrieve Pages.” when a published page is assigned as the Privacy Policy page. The frontend continues to render correctly.
The query defaults to
editcontext, which excludes pages the current user cannot edit. For Editors, this includes the Privacy Policy page. The mismatch between returned records and the reported total causes core-data to treat the results as incomplete.View context was previously added in #42559 to support users with lower permissions, then appears to have been unintentionally removed during the refactor in #46930.
How?
Explicitly sets
context: 'view'in the Page List query. All fields used by the block are available in view context.Testing Instructions
Testing Instructions for Keyboard
Using only the keyboard, create a post, type
/page list, and select the Page List block. Confirm the published pages appear without the retrieval error.Use of AI Tools
AI assistance: Yes
Tool(s): Codex
Model(s): GPT-6.1 Sol (light)
Used for: To investigate the issue and Git history and draft this PR description.