Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6598 closed defect (fixed)

Bad interaction with GanttCalendarPlugin

Reported by: alephnull@… Owned by: doki_pen
Priority: low Component: AnnouncerPlugin
Severity: minor Keywords: gantt
Cc: Trac Release: 0.11

Description

The GanttCalendarPlugin adds two top level navigation items "Gantt ticket", URL /ticketcalendar and "Calendar", URL /ticketgantt. I run the installation off the / location and not the /trac location.

When accessing either of these URLs, the traceback is:

2010-02-09 18:19:35,295 Trac[main] ERROR: need more than 1 value to unpack
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 233, in dispatch
    self._post_process_request(req)
  File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 301, in _post_process_request
    f.post_process_request(req, *(None,)*extra_arg_count)
  File "build/bdist.linux-x86_64/egg/announcerplugin/subscribers/watchers.py", line 138, in post_process_request
    realm, _ = path.split('/', 1)
ValueError: need more than 1 value to unpack

It appears that the watcher module does not identify these two URLs as unwatchable and the fact that there is no /trac prefix to all URLs is causing the problem. Is there a way to specify URL paths to ignore ?

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by mwehr

Hi,

you can try following patch :-)

--- watchers.py	(revision 5)
+++ watchers.py	(revision 6)
@@ -134,6 +134,8 @@
                 'email' in req.session):
             for pattern in self.watchable_paths:
                 path = self.normalise_resource(req.path_info)
+                if path == 'ticketgantt' or path == 'ticketcalendar':
+                    break 
                 if re.match(pattern, path):
                     realm, _ = path.split('/', 1)
                     if '%s_VIEW'%realm.upper() not in req.perm:

comment:2 Changed 5 years ago by alephnull@…

Thank you. This certainly fixed the problem. However, I do have a follow-up question. Is it not conceivable that other plugins will introduce similar top-level URLs like these ? Or is it forbidden by trac policy ?

If the former, we should have a more generic form of excluding URLs, if the latter, then this ticket should be closed.

comment:3 Changed 5 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from new to closed

(In [7544]) Fixes incompatibility with some plugin urls

Fixes #6598

comment:4 Changed 5 years ago by doki_pen

(In [7570]) Fixes incompatibility with some plugin urls

Fixes #6598

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.