-
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
Iframe: Stylesheet was not properly added error #34333
Comments
I can confirm, I get the same error messages by using the "enqueue_block_editor_assets" action. In my case I have global block styles, which are not block specific. Why this error messages are added with the latest release? |
I've run into this as well. |
@bph is this issue only related to "Backwards Compatibility" and "CSS Styling"? For me it sounds like wrong error messages. This error message are also fired by styles which are included by And on the other hand, the block style check should not fire on styles which are included with |
Is this still an issue after WP 6.3? For more info on styles in the iframe, see https://make.wordpress.org/core/2023/07/18/miscellaneous-editor-changes-in-wordpress-6-3/#post-editor-iframed. |
Hi @ellatrix! I just checked it on a site with WP 6.3, and I couldn't see the error anymore. So I'm closing this issue. |
Description
In the latest version of Gutenberg, I started receiving an error in the console. It was introduced here: https://github.com/WordPress/gutenberg/pull/31870/files#diff-ab17abd38e687edd56573694ae3017e105e96b319571c190e9d4705c1872bc9cR58
Basically, the error is happening every time I select a block that contains the iframe to the sidebar, and this block enqueues styles through the following hooks:
enqueue_block_assets
/enqueue_block_editor_assets
.Since it's something new and we need backward compatibility in plugins, I wonder if it should be just a deprecation warning instead of an error. Or is there any other approach we could use for older WP versions along with the new approach?
Also, if we have styles shared between different blocks, how could we do that? Should
editorStyle
andstyle
support arrays?Step-by-step reproduction instructions
enqueue_block_assets
orenqueue_block_editor_assets
) to enqueue styles.Screenshots, screen recording, code snippet
Environment info
Pre-checks
The text was updated successfully, but these errors were encountered: