Opened 14 years ago
Closed 14 years ago
#16011 closed defect (bug) (fixed)
Editing a Network Activated plugin deactivates it
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Plugins | Keywords: | has-patch needs-parentheses |
Focuses: | Cc: |
Description
When you go to edit a plugin using the plugin editor, it comes back up as "(active)", however it will actually be deactivated.
Only spotted this with Network Activated plugins.
3.1 RC1.
Attachments (3)
Change History (14)
#3
@
14 years ago
is_plugin_active() checks for is_plugin_active_for_network().
Instead, I imagine the check should probably be based on !empty($_GET['networkwide'])
. If true, check is_plugin_active_for_network. Otherwise, is_plugin_active.
#5
@
14 years ago
- Keywords has-patch added; needs-patch removed
Revised the condition.
BTW, currently when I activate a plugin for Network, it disappears from wp-admin/plugins.php
. Not sure how I've managed to get it activated in both places simultaneously.
#6
follow-up:
↓ 8
@
14 years ago
Seems fine, but let's add some parens to make the order of operations clear.
#7
follow-ups:
↓ 9
↓ 10
@
14 years ago
- Keywords needs-parentheses added
I imagine you were able to double-activate because it was active on the main site first, then you network activated it. (Network deactivating it will leave it active on the main site, as before.)
#8
in reply to:
↑ 6
@
14 years ago
Replying to ryan:
Seems fine, but let's add some parens to make the order of operations clear.
Done.
#9
in reply to:
↑ 7
@
14 years ago
Replying to nacin:
I imagine you were able to double-activate because it was active on the main site first, then you network activated it. (Network deactivating it will leave it active on the main site, as before.)
When I network activate a plugin, it disappears from the list of active plugins on the main site, so I guess this means it is automatically deactivated there (or should be).
Was able to reproduce with a plugin which was activated both for Network and specifically on the current site.
is_plugin_active()
was returning true, so plugin was not reactivated for Network.I guess we can check
is_plugin_active_for_network()
too. Patch included.Or perhaps
deactivate_plugins()
should always checkactive_plugins
, even if$network_wide
.