[wp-trac] [WordPress Trac] #45253: "Unhandled promise rejection" in 5.0-RC2

WordPress Trac noreply at wordpress.org
Tue Jan 15 01:55:30 UTC 2019


#45253: "Unhandled promise rejection" in 5.0-RC2
--------------------------+-------------------------
 Reporter:  jsmoriss      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  Editor        |     Version:  5.0
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:  javascript
--------------------------+-------------------------
Changes (by jsmoriss):

 * status:  closed => reopened
 * resolution:  worksforme =>


Comment:

 Replying to [comment:19 pento]:
 > I'm unable to reproduce this issue with the WPSSO plugin installed.

 That's because I coded around it.


 {{{
 /**
  * Calling use_block_editor_for_post() in WordPress v5.0 during post save
 crashes
  * the web browser. See https://core.trac.wordpress.org/ticket/45253 for
 details.
  * Only call use_block_editor_for_post() if using an earlier version of
 WordPress.
  */
 global $wp_version;

 if ( version_compare( $wp_version, '5.0', '>=' ) ) {    // Assume can
 edit.
         $can_edit_id = true;
 } elseif ( use_block_editor_for_post( $post_id ) ) {
         $can_edit_id = true;
 }
 }}}

 From
 https://plugins.trac.wordpress.org/browser/wpsso/trunk/lib/com/util.php#L1144

 js.

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


More information about the wp-trac mailing list