dynamic unloading and loading of plugins
|Reported by:||madtownlems||Owned by:|
If I'm blog 1 and I switch_to_blog(2), I'm still running in the environment of blog 1. All blog 1's activated plugins are active, and not all of blog 2's plugins necessarily are.
I first ran into the problem trying to get Subscribe2 (S2) to work well with Site Wide Tags (SWT).
SWT basically works like this:
When someone makes a post on their blog: switch_to_blog(aggregrate_blog_id);
S2 says that whenever someone inserts a post, to send an email alert out.
With both of these plugins enabled, a post always generates TWO emails, regardless of whether S2 is active on the aggregate blog. The same is true for any behavior that triggers on a new post being created (such as automated tweeting, etc).
I feel that, if I'm really switching to that blog, I should be running more comprehensively as it. That is, with its plugins active, and none of its un-activated plugins active.
The examples of conflicts I gave are blog behavior, and are more or less just annoying, but I could easily see this causing unforeseen security flaws as well.
Change History (14)
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
- Keywords reporter-feedback added
- Type changed from defect (bug) to feature request
- Version set to 3.0
- Component changed from General to Multisite
- Keywords needs-patch added; reporter-feedback removed
- Milestone set to 3.1
- Type changed from feature request to enhancement
- Summary changed from switch_to_blog() runs with active plugins of original blog to switch_to_blog() needs documentation
- Summary changed from switch_to_blog() needs documentation to switch_to_blog() needs documentation; dynamic unloading and loading of plugins
- Keywords needs-patch removed
- Milestone changed from 3.1 to Future Release
- Summary changed from switch_to_blog() needs documentation; dynamic unloading and loading of plugins to dynamic unloading and loading of plugins