-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
If there is a block with apiVersion of 2 in block.json, the content width is applied to the pattern preview #52155
Comments
Probably related to the changes from #48286. |
Are we not expecting block developers to update to version 3 though? |
Updating to WordPress 6.3 beta3 resolved this issue! |
The problem appears to exist in WordPress Beta3 as well. I tested with the nightly build version (WordPress 6.3-beta3-56143). 5a6a55fd00683975e47e16272b21c13a.mp4 |
Sorry!I had checked it in the site editor. For the post editor, it was not fixed even in WordPress 6.3 beta3. |
I'm still unable to reproduce the issue when the Gutenberg plugin is active. This makes debugging a bit harder. One difference I noticed when testing WP 6.3-beta4 + Can anyone confirm this behavior?
|
I too can confirm that log. What I am a little concerned about is that if the apiVersion:2 block exists and the Gutenberg plugin is activated, the main editor becomes an iframe. My understanding is that the main editor should not be an iframe if the apiVersion:2 block is included, with or without the Gutenberg plugin, as was done in #48286. But I don't know if this is relevant to this issue 🤔 |
There's a special check for the Gutenberg plugin, so I assume it's always enabled with a plugin for testing purposes. The code shipped in #48286. gutenberg/packages/edit-post/src/components/visual-editor/index.js Lines 362 to 365 in 388d3d4
P.S. You can reproduce the same issue with the Gutenberg plugin active by enabling the meta boxes. |
You can consistently reproduce the issue with or without the Gutenberg plugin by enabling "Custom fields." It doesn't require a block - The problem is with the Update: One way we can resolve this is to add "markers" to the Why
|
I just pushed proof-of-concept PR that solves the issue using the "markers" method I mentioned in my previous comment - #52640. |
Description
For example, activate a plugin with apiVersion 2 blocks such as CoBlocks. The content width would then be applied to the content in the pattern preview.
Specifically, the following styles will be added in the pattern preview.
If the apiVersion is only a block of 3, this style will not be loaded.
Even without the block plugin installed, I was able to reproduce the problem by changing
wp-includes/blocks/blocks-json.php
as follows.Step-by-step reproduction instructions
wp-includes/blocks/blocks-json.php
.Screenshots, screen recording, code snippet
Kapture.2023-06-30.at.15.16.51.mp4
Environment info
This problem does not occur when the Gutenberg (v16.1.0) plugin is activated.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: