[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 17:56:57 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 dev-reviewed fixed-major   |     Focuses:
  commit                                         |
-------------------------------------------------+-------------------------

Comment (by desrosj):

 In [changeset:"51393" 51393]:
 {{{
 #!CommitTicketReference repository="" revision="51393"
 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`.

 Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu, dlh,
 noisysocks.
 Merges [51388] to the 5.8 branch.
 Fixes #53569. See #53437.
 }}}

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


More information about the wp-trac mailing list