Make WordPress Core

Opened 9 months ago

Closed 3 months ago

#59213 closed enhancement (duplicate)

Disable the wp_safe_redirect(), or wp_redirect() in the register_activation_hook when batch activating plugins

Reported by: rajinsharwar's profile rajinsharwar Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords: needs-patch
Focuses: administration Cc:

Description

For example, I have plugin A and plugin B. And plugin A has a wp_redirect() with the register_activation_hook to redirect the admin to the plugin's Settings page after activation.

So now, if I try to batch activate both plugins, we will see that after activating plugin A, I am redirected to the settings page of plugin A, and plugin B didn't get activated because of this. So, in essence, it's breaking the activating loop without activating all the selected plugins. This is really annoying when you are debugging issues with plugins that all have redirection rules after activation.

I am proposing to stop the execution of wp_redirect() whenever there is a batch activation of plugins. This behaviour is evident when using the troubleshooting mode of the Health Check & Troubleshooting plugin.

Change History (3)

#1 @johnbillion
9 months ago

  • Focuses administration added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Yes please.

#2 @SergeyBiryukov
9 months ago

Related/duplicate: #40252, #40454.

#3 @swissspidy
3 months ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #40252.

Note: See TracTickets for help on using tickets.