[wp-trac] [WordPress Trac] #33215: Main plugin file loaded multiple times under special circumstances on Network Activate
WordPress Trac
noreply at wordpress.org
Sun Apr 3 12:25:51 UTC 2016
#33215: Main plugin file loaded multiple times under special circumstances on
Network Activate
--------------------------+----------------------------------------
Reporter: ccprog | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Plugins | Version: 4.2.3
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: administration, multisite
--------------------------+----------------------------------------
Comment (by mensmaximus):
Replying to [comment:3 jeremyfelt]:
> Would it make sense to automatically de-activate the plugin on the main
site before activating it network wide or show a notice that the plugin
should be deactivated first... or a mix?
Wouldn't this be dangerous in case a plugin is not multisite compatible or
if a plugin author explicitly decides to change the logic of a plugin in
case it gets network activated?
What if options get stored in
{{{
$wpdb->base_prefix . "options"
}}}
after network activation instead of
{{{
$wpdb->prefix . "options"
}}}
opposed to a per site activation?
If a plugin was active before this could lead to loss of all stored
options. We all know that from many child themes that do not share the
settings with the parent. And there it is still the same table.
My first idea would be to disable the network activation by default as
soon as a plugin has been installed on a per site basis. If there would be
a filter for the network activation a plugin developer could decide
whether to disable this default to allow network activation even if the
plugin has already been activated on individual sites because his plugin
stores options always at the same place.
In such a case deactivating wont hurt. The question is, is this something
wordpress core has to solve or is it something a plugin developer should
handle during activation (despite the fact there is no way to deactivate
network activation at the moment ... network: false would be helpful in
the plugin file header)?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33215#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list