-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Query block: remove incorrect selector call #66581
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If 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. |
Size Change: -53 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
Flaky tests detected in d366821. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11598535863
|
f208185
to
d366821
Compare
Fixed in #65820 |
What?
__experimentalGetTemplateForLink
requires a first argument (the link) to work. Without the link argument the resolver will fail. The only reason this returns anything right now is because__experimentalGetTemplateForLink
has already been called, and the resolver already triggered.link
argument, this selector essentially test if we're in the Site Editor or not. The Site Editor is the only place where__experimentalGetTemplateForLink
will ever (and always) return a result without an argument.null
.postType
orpostId
from the context. See here and here. That check is already here, so this code actually seems to be checking for the Site Editor twice?Why?
Remove an incorrect call, which in turn causes an incorrect request (
/wp-admin/site-editor.php?_wp-find-template=true
).How?
Remove it.
Testing Instructions
It was originally added in https://github.com/WordPress/gutenberg/pull/65067/files#r1821498758, so I assume the same testing instructions:
Testing Instructions for Keyboard
Screenshots or screencast