Ticket #6598 (closed defect: fixed)

Opened 1 month ago

Last modified 1 month ago

Bad interaction with GanttCalendarPlugin

Reported by: alephnull@gmail.com Assigned to: 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

Change History

02/10/10 21:18:29 changed 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:

02/12/10 02:47:41 changed by alephnull@gmail.com

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.

02/13/10 14:28:46 changed by doki_pen

  • status changed from new to closed.
  • resolution set to fixed.

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

Fixes #6598

02/13/10 20:28:27 changed by doki_pen

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

Fixes #6598


Add/Change #6598 (Bad interaction with GanttCalendarPlugin)




Change Properties
Action