Opened 17 years ago
Closed 17 years ago
#5632 closed defect (fixed)
Non-egg plugins show up multiple times in a multi-project setup
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | normal | Milestone: | 0.10.5 |
Component: | general | Version: | devel |
Severity: | critical | Keywords: | plugin |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
For simple, single-python-file plugins, my admin panel shows N checkboxes where N is the number of trac instances in my multi-project environment.
Attachments (1)
Change History (10)
comment:1 by , 17 years ago
Severity: | normal → critical |
---|
follow-up: 3 comment:2 by , 17 years ago
Milestone: | 0.11 → 0.10.5 |
---|
N corresponds to the number of environments that have been activated so far and that contain a version of the plugin.
It's a serious issue but I don't think it's 0.11 specific. Can someone checks if this happens on 0.10-stable as well?
comment:3 by , 17 years ago
Replying to cboos:
N corresponds to the number of environments that have been activated so far and that contain a version of the plugin.
I'm pretty sure it's not that, unless I don't understand what you mean by "activated so far." My setup has 9 trac environments. The attached screenshot is just the first of 5 similar pages!
comment:5 by , 17 years ago
Keywords: | plugin added |
---|
Well, when I start a server with two environments, each containing a few single file plugins in <env>/plugins, then everything is fine for the first environment I visit (/admin/plugins lists the expected plugins). Then, I go to the second environment and there I see the expected plugins, plus the ones already loaded by the first environment. Going back to the first env now will also show all mixed plugins.
This is with 0.10.5dev. I somehow have the impression this is old news, but I can't find a pre-existing ticket.
In your case, there could be additional issues…
comment:6 by , 17 years ago
I think the problem could be fixed by the changes in the plugin loader made at [6016:6017].
Could you please verify?
comment:7 by , 17 years ago
Owner: | changed from | to
---|
In case we want this for 0.10 (which is probably a good idea), I've tested this patch on that branch as well (as of r 6233):
-
0.10-stable/trac/loader.py
49 49 if plugin_name not in loaded_components: 50 50 env.log.debug('Loading file plugin %s from %s' % \ 51 51 (plugin_name, plugin_file)) 52 module = imp.load_source(plugin_name, plugin_file) 52 if plugin_name not in sys.modules: 53 module = imp.load_source(plugin_name, plugin_file) 53 54 loaded_components.append(plugin_name) 54 55 if auto_enable and plugin_name + '.*' \ 55 56 not in env.config['components']:
Think it should be correct - works fine for me, but more testing is welcome.
comment:9 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I take it back; N is seemingly random. And this is not a benign presentation bug; the plugins will take effect N times. That can result in N transformations of the same wiki text, for example, where only one was intended.