[wp-trac] [WordPress Trac] #53432: Fatal error during update to 5.8 of a site with an active Gutenberg plugin (version less than 10.7)

WordPress Trac noreply at wordpress.org
Mon Jun 28 05:34:34 UTC 2021


#53432: Fatal error during update to 5.8 of a site with an active Gutenberg plugin
(version less than 10.7)
---------------------------------------+-----------------------------
 Reporter:  oglekler                   |       Owner:  hellofromTonya
     Type:  defect (bug)               |      Status:  assigned
 Priority:  normal                     |   Milestone:  5.8
Component:  Upgrade/Install            |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  has-screenshots has-patch  |     Focuses:
---------------------------------------+-----------------------------

Comment (by peterwilsoncc):

 Replying to [comment:20 peterwilsoncc]:
 > For multisite installs that have Gutenberg enabled on individual sites
 (rather than network activated),
 `_upgrade_580_force_deactivate_incompatible_plugins()` will need to run as
 part of the database upgrade.

 Testing this proved a little ugly.

 To determine the version of Gutenberg enabled during the database upgrade
 requires copying `_upgrade_580_force_deactivate_incompatible_plugins()` in
 to `src/wp-admin/includes/upgrade.php` and modifying it to get the plugin
 data via `get_plugin_data( WP_PLUGIN_DIR . '/gutenberg/gutenberg.php' )`
 as plugins are not loaded for the DB upgrade screen.

 The existing check during `upgrade_core()` would need to be retained as
 waiting until the database upgrade runs is too late as by then the plugin
 has triggered the fatal error.

 As it's a little complex, I couldn't work out anything I was super happy
 with have put my test code in a gist for you to see my thinking
 https://gist.github.com/peterwilsoncc/689be020e5aa6561b0189cba59090c26 --
 as you'll see with the missing conditions and triggering of logs, I didn't
 get beyond testing a few ideas.

 ----

 I've pushed a few changes to the linked pull request for the notification
 side of things:

 * renamed function to drop the `wp_` prefix
 * use a network wide option for deactivating network activated Gutenberg
 * populating the option in the database upgrade routine

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


More information about the wp-trac mailing list