WordPress.org

Make WordPress Core

#46029 closed task (blessed) (fixed)

upgrade_500_was_gutenberg_active is not tested with multisite

Reported by: manfcarlo Owned by: peterwilsoncc
Milestone: 5.1 Priority: normal
Severity: normal Version: 5.0
Component: Upgrade/Install Keywords: has-patch
Focuses: multisite Cc:

Description

When setting the value of upgrade_500_was_gutenberg_active, update_site_option is used. When retrieving the value, get_option is used.

This means that the gutenberg message can not be displayed on multisite.

Furthermore, if there are more than one network, the site option is only stored for whichever network is responsible for updating wordpress, meaning that other networks do not get the site option.

I'm not sure what the solution should be, considering that gutenberg might have been active on some sites but not others. But storing a site option that never gets retrieved seems pointless.

Attachments (2)

46029.diff (1.1 KB) - added by peterwilsoncc 22 months ago.
46029.2.diff (1.6 KB) - added by peterwilsoncc 21 months ago.

Download all attachments as: .zip

Change History (11)

#1 @pento
22 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.1

Thank you for the bug report, @manfcarlo!

We can actually just remove this part of the upgrade routine in 5.1, as the About page will be redone for the 5.1 release.

#2 @pento
22 months ago

  • Type changed from defect (bug) to task (blessed)

Changing this to a task, as it will be handled as part of the 5.1 About page.

#3 @peterwilsoncc
22 months ago

  • Keywords has-patch added; needs-patch removed

In 46029.diff

  • function deprecated and nooped.
  • call removed in upgrade routine
  • as with other functions deprecated in files that aren't always included, I have kept the deprecated call in the original location.

#4 @ocean90
21 months ago

There should also be an upgrade routine to remove the upgrade_500_was_gutenberg_active site option.

#5 @peterwilsoncc
21 months ago

Thanks @ocean90

In 46029.2.diff:

  • function deprecated and nooped.
  • call removed in upgrade routine
  • as with other functions deprecated in files that aren't always included, I have kept the deprecated call in the original location
  • New: delete option in 5.1.0 upgrade routine

#6 @manfcarlo
21 months ago

Related to the original ticket:

Furthermore, if there are more than one network, the site option is only stored for whichever network is responsible for updating wordpress, meaning that other networks do not get the site option.

This was as per my inspection of a multi-network database.

Would this patch delete the site option for the same network that updated to 5.0.0, or would it only check the one that happens to be responsible for updating to 5.1.0?

#7 @spacedmonkey
21 months ago

@manfcarlo Thanks for your ticket. When running multisite with multi network, it is expected that you run the upgrade on every network and every site. By doing this it would fix this issue as I understand.

#9 @peterwilsoncc
21 months ago

  • Owner set to peterwilsoncc
  • Resolution set to fixed
  • Status changed from new to closed

In 44732:

Install/upgrade: Remove Gutenberg plugin deactivation from upgrade process.

The Gutenberg plugin will not be deactivated on sites upgrading to WordPress 5.1. This deprecates the upgrade_500_was_gutenberg_active option and the upgrade_500() function as they are no longer required.

Props peterwilsoncc.
Fixes #46029.

Note: See TracTickets for help on using tickets.