[wp-trac] [WordPress Trac] #59213: Disable the wp_safe_redirect(), or wp_redirect() in the register_activation_hook when batch activating plugins
WordPress Trac
noreply at wordpress.org
Sat Aug 26 13:28:19 UTC 2023
#59213: Disable the wp_safe_redirect(), or wp_redirect() in the
register_activation_hook when batch activating plugins
--------------------------+-----------------------------
Reporter: rajinsharwar | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59213>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list