Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#46812 closed defect (bug) (fixed)

Recovery mode: Plugin not removed from paused list when fatal error is fixed

Reported by: henrywright's profile henry.wright Owned by: flixos90's profile flixos90
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Site Health Keywords: servehappy has-patch
Focuses: administration Cc:


To reproduce please follow these steps:

1: Go to wp-admin > Plugins and enable a given plugin
2: Create a fatal error in that plugin
3: Go to wp-admin > Plugins again. You should now be in recovery mode
4: Fix the fatal error in the plugin
5: Now click on "Deactivate"
6: Now click on "Activate"

I would expect the plugin to activate normally because the fatal error has been fixed. However, the plugin is still in the paused list.

Attachments (1)

46812.diff (1.1 KB) - added by flixos90 5 years ago.

Download all attachments as: .zip

Change History (7)

#1 @spacedmonkey
5 years ago

  • Keywords needs-patch servehappy added
  • Version set to trunk

#2 @henry.wright
5 years ago

I think this will be necessary. I'm not sure where the best place will be though

$storage = new WP_Paused_Extensions_Storage( 'plugin' );
$storage->delete( $plugin_name );

#3 @SergeyBiryukov
5 years ago

  • Component changed from General to Plugins
  • Focuses administration added

5 years ago

#4 @flixos90
5 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.2
  • Owner set to flixos90
  • Status changed from new to assigned

This happens for themes too, and it's because the extensions are not removed from the paused storage when they're deactivated. 46812.diff fixes this.

#5 @flixos90
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 45115:

Bootstrap/Load: Remove extension from the list of paused extensions when it is deactivated.

With this change, fatal errors recorded before a plugin was deactivated or a theme was switched away from do not persist. This ensures that re-enabling it re-checks for fatal errors correctly.

Props aandrewdixon, dhanukanuwan, henrywright.
Fixes #46812.

#6 @spacedmonkey
5 years ago

  • Component changed from Plugins to Site Health
Note: See TracTickets for help on using tickets.