[wp-trac] [WordPress Trac] #53569: Block widgets editor is hidden if a block enqueues 'wp-edit-post' stylesheet

WordPress Trac noreply at wordpress.org
Fri Jul 9 01:17:56 UTC 2021


#53569: Block widgets editor is hidden if a block enqueues 'wp-edit-post'
stylesheet
--------------------------+-----------------------
 Reporter:  dlh           |       Owner:  zieladam
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.8
Component:  Widgets       |     Version:  trunk
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by noisysocks):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51388" 51388]:
 {{{
 #!CommitTicketReference repository="" revision="51388"
 Widgets: Warn when wp-editor script or wp-edit-post style is enqueued in
 widgets editor

 It is common that plugins erroneously have `wp-editor` or `wp-edit-post`
 as a
 dependency in a script that is loaded in the new widgets editor. This is a
 smell
 since both `@wordpress/editor` and `@wordpress/edit-post` assume the
 existence
 of a global "post" object which the widgets editor does not have.

 [51387] fixes the user-facing errors typically caused by this mistake, but
 we
 can go a step further and warn developers about this by calling
 `_doing_it_wrong()` when we detect that the `wp-editor` script or `wp-
 edit-post`
 style is enqueued alongside `wp-edit-widgets` or `wp-customize-widgets`.

 See #53437.
 Fixes #53569.
 Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu, dlh.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53569#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list