-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Package] Block editor/packages/block-editor/packages/block-editor[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
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.
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
max-width: 650px;
margin-left: auto !important;
margin-right: auto !important;
}
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.
<?php return array(
'archives' => array(
'$schema' => 'https://schemas.wp.org/trunk/block.json',
'apiVersion' => 2, // 3 to 2
Step-by-step reproduction instructions
- Activate the appropriate block plugins. For example, CoBlocks
- Open the Submission Editor
- Open the Pattern Inserter
- Check the preview
- Modify
wp-includes/blocks/blocks-json.php
. - Open the Submission Editor
- Open the Pattern Inserter
- Check the preview
Screenshots, screen recording, code snippet
Kapture.2023-06-30.at.15.16.51.mp4
Environment info
- WordPress 6.3 beta2
- TwentyTwentyThree v1.1
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
Metadata
Metadata
Assignees
Labels
[Package] Block editor/packages/block-editor/packages/block-editor[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended