-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Block Bindings: Fix pattern override bug, editing was allowed on non enabled overrides blocks. #71813
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
Block Bindings: Fix pattern override bug, editing was allowed on non enabled overrides blocks. #71813
Conversation
|
Size Change: +41 B (0%) Total Size: 1.95 MB
ℹ️ View Unchanged
|
|
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. |
d558ee3 to
d976bd2
Compare
|
Test pattern that I used: <!-- wp:paragraph {"metadata":{"name":"Post Meta Binding","bindings":{"content":{"source":"testing/complete-source","args":{"key":"text_field"}},"__default":{"source":"core/pattern-overrides"}}}} -->
<p>Post Meta Binding</p>
<!-- /wp:paragraph -->
<!-- wp:buttons -->
<div class="wp-block-buttons"><!-- wp:button {"metadata":{"name":"Read Only Button","bindings":{"url":{"source":"core/post-meta","args":{"key":"url_custom_field"}},"__default":{"source":"core/pattern-overrides"}}}} -->
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button"></a></div>
<!-- /wp:button --></div>
<!-- /wp:buttons -->Screencast confirming that editing both overrides and other sources used with a single block works perfectly fine: Screen.Recording.2025-09-23.at.11.39.17.movEdit: Pleas ignore the misleading names in the UI that I noticed after watching it here 😄 |
|
Flaky tests detected in 4cfc67d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17943715486
|
…enabled overrides blocks. (#71813) * Fix pattern override bug, first attempt * Fix richtext basically not working * Add e2e test * Update test * Update the test to edit the link Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>

What?
Closes #71768
Why?
Explained in #71768. Quick summary:
If you have a pattern override, with one block with overrides enabled, and the other one with overrides disabled. If this second one has any bound attribute, it becomes editable when it should not.
How?
Make an additional check on richtext that contains
__defaultattribute that makes the block override enabled.Testing Instructions
The issue has a more detailed explanation about how to debug it. There is also a new e2e.