Skip to content

72: Avoid replacing core/query namespace on query loop wrapper - #75

Merged
kadamwhite merged 1 commit into
mainfrom
72/namespace-mismatch
Nov 2, 2026
Merged

kadamwhite merged 1 commit into
mainfrom
72/namespace-mismatch

Conversation

@kadamwhite

@kadamwhite kadamwhite commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

For #72. With enhanced pagination on, core declares data-wp-interactive="core/query on the query loop wrapper and the pagination links look for that namespace when reading their context. We were replacing this with query-filter, which orphaned those links by removing the context they looked for. This caused a TypeError to be output on every page load and after every pagination interaction.

Our own blocks don't actually need the query-filter namespace itself, each block sets it own, so now we only set the namespace when core has not.

Open WordPress Playground Preview

For #72. With enhanced pagination on, core declares `data-wp-interactive="core/query`
on the query loop wrapper and the pagination links look for that namespace
when reading their context. We were replacing this with `query-filter`,
which orphaned those links by removing the context they looked for. This
caused a TypeError to be output on every page load and after every
pagination interaction.

Our own blocks don't actually need the `query-filter` namespace itself,
each block sets it own, so now we only set the namespace when core has not.
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Playwright — PHP 8.3 / WP latest

passed  52 passed

Details

stats  52 tests across 11 suites
duration  1 minute, 2 seconds
commit  f898c56

@goldenapples goldenapples left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix seems correct, and matches the workarounds that I see in other projects that have run into this issue.

@kadamwhite
kadamwhite merged commit 5181cc0 into main Nov 2, 2026
6 checks passed
@kadamwhite
kadamwhite deleted the 72/namespace-mismatch branch November 2, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants