Opened 9 years ago

Closed 9 years ago

# Admin page not displayed on 0.11 final

Reported by: Owned by: anonymous Colin Guthrie high WorkLogPlugin normal denis.kostousov@… 0.11

### Description

WorklogPlugin works, but no admin config panel is present. An admin entry is present, but clicking it results in worklog page.

Workaround: in webadminui.py, change type to something other than worklog (like workls as a test). It seems that match_request() in webui.py (or something like that)is catching the admin link.

Sorry - this is not a proper fix. I don't know trac or worklogplugin very well (but know both better now).

### comment:1 Changed 9 years ago by dsteven@…

I've done some more digging and have a better fix (sorry - no patch, just an edit instruction):

weblog/webui.py

Line 84 (ish)

def match_request(self, req):

if re.search('/worklog'...

replace if re.search line with:

re.match(r'/worklog/?\$', req.path_info) is not None:

Like in trac/ticket/web_ui.py

Seems to fix it. Changing the webadmin type dissociates the config and the worklog, and fixes the admin display, but does not allow the options to be actioned.

Hope this helps, and I hope this plugin willbe the help to me that is seems. Nice work.

### comment:2 Changed 9 years ago by Colin Guthrie

Status: new → assigned

That's strange! I don't get this bug :s

I'm not 100% sure how python's work, but in most regular expressions you can use a caret ^ to mean "start of the line".

So (seeing as I can't replicate here!), can you tell me if a line like:

re.search('^/worklog........


work?

This change should be in line 31, 85, 96 and 100.

I'm not 100% sure how this will work if trac is installed in a subdirectory but I can test that if you can confirm it fixes your problem.

Cheers :)

PS I've got some big changes coming up for this plugin, but I need to discuss some of the details with other Trac people as it would go some way to breaking compatibility with TimingAndEstimationPlugin and I want to make sure that we can move together in some way (perhaps via a common third plugin....)

### comment:3 Changed 9 years ago by anonymous

I'll try - my other fix breaks the worklog/users/xxxx pages

My trac URL us http://host/trac/projects/trac-instance-name using mod_python. I'm just setting up a clean place to test/replicate.

### comment:4 Changed 9 years ago by anonymous

Thanks. re.search('/worklog.... on the line suggested has fixed it. works a treat.

FYI - setup is all latest (non dev releases) of download sites:

• fedora 9 i386
• trac 0.11 final
• Genshi 0.5
• python 2.5
• mod_python

### Changed 9 years ago by denis.kostousov@…

I think this patch can solve the problem temporary

### comment:6 Changed 9 years ago by Colin Guthrie

Resolution: → fixed assigned → closed

I think this was fixed in [5022].

Sorry for the delays in addressing this :( (I've been over worked - ooh the irony ;))

### Modify Ticket

Change Properties