WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 15 months ago

Last modified 13 months ago

#46812 closed defect (bug) (fixed)

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

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

Description

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 15 months ago.

Download all attachments as: .zip

Change History (7)

#1 @spacedmonkey
15 months ago

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

#2 @henry.wright
15 months 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
15 months ago

  • Component changed from General to Plugins
  • Focuses administration added

@flixos90
15 months ago

#4 @flixos90
15 months 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
15 months 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
13 months ago

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