Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#5632 closed defect (fixed)

Non-egg plugins show up multiple times in a multi-project setup

Reported by: Dave Abrahams <dave@…> 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)

plugins.png (134.0 KB ) - added by Dave Abrahams <dave@…> 17 years ago.
Screeshot of Admin panel

Download all attachments as: .zip

Change History (10)

comment:1 by Dave Abrahams <dave@…>, 17 years ago

Severity: normalcritical

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.

comment:2 by Christian Boos, 17 years ago

Milestone: 0.110.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?

in reply to:  2 comment:3 by Dave Abrahams <dave@…>, 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!

by Dave Abrahams <dave@…>, 17 years ago

Attachment: plugins.png added

Screeshot of Admin panel

comment:4 by Dave Abrahams <dave@…>, 17 years ago

FWIW I am using [inherit] to share a single plugins directory.

comment:5 by Christian Boos, 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 osimons <simon-code@…>, 16 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 osimons, 16 years ago

Owner: changed from Jonas Borgström to osimons

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

     
    4949                if plugin_name not in loaded_components:
    5050                    env.log.debug('Loading file plugin %s from %s' % \
    5151                                  (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)
    5354                    loaded_components.append(plugin_name)
    5455                    if auto_enable and plugin_name + '.*' \
    5556                            not in env.config['components']:

Think it should be correct - works fine for me, but more testing is welcome.

comment:8 by Christian Boos, 16 years ago

+1 for backporting this

in reply to:  8 comment:9 by osimons, 16 years ago

Resolution: fixed
Status: newclosed

Replying to cboos:

+1 for backporting this

Ported in [6256]. Closes ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from osimons to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.