#54158 closed defect (bug) (invalid)
Themes should be updated to use add_editor_style
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
twentyten, twentyeleven, twentytwelve, twentythirteen, twentyfourteen, twentyfifteen, twentysixteen, twentyseventeen, and twentytwenty should be updated to enqueue editor styles using add_editor_style
instead of wp_enqueue_style
In the block editor, with the sidebar open if we insert a block that has a styles panel (like an image, social links or site logo) a JS error is thrown: "Stylesheet ... was not not properly added"
Change History (5)
#2
@
4 years ago
- Component changed from Themes to Bundled Theme
Is it an order issue instead of a wp_enqueue_style
problem?
The how-to guide says that "you first need to add_theme_support
" when including add_editor_style('editor-styles')
. Only Twenty Nineteen and Twenty Twenty-One have add_theme_support
before add_editor_style
.
#3
@
4 years ago
@ellatrix @youknowriad any thoughts here? We can reopen https://github.com/WordPress/gutenberg/issues/35018 if no theme updates are needed.
#4
@
4 years ago
- Resolution set to invalid
- Status changed from new to closed
Thanks y'all for taking a look.
So I was able to chat with folks and it looks like this behavior is expected. The console error is meant to be a warning or upgrade path. Let's close out this issue out and I can modify https://github.com/WordPress/gutenberg/issues/35018 to update that console.error to a console.warn.
It is not the themes that need to update.
The block editor should be updated to work with the thousands of existing themes that do it the old way.