Modify

Opened 6 years ago

Closed 4 years ago

#3996 closed defect (fixed)

[Patch] Wiki mainnav tab does not activate correctly

Reported by: acamac Owned by: rjollos
Priority: normal Component: VotePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

It looks like this might have started after Trac implemented this CR #3655, no longer supporting changing the request as part of pre_process_request(). This causes the prepare_request() to be called without a handler which cause the activation not to be checked. See callstack below. Just move this to post_process_request(). Attaching suggested change.

Tab activation does NOT work

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 394, in dispatch_request
    return _dispatch_request(req, env, env_error)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 173, in dispatch
    chosen_handler)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 286, in _pre_process_request
    chosen_handler = filter_.pre_process_request(req, chosen_handler)
File "/usr/lib/python2.4/site-packages/TracVote-0.1-py2.4.egg/tracvote/__init__.py", line 139, in pre_process_request
    self.render_voter(req)
File "/usr/lib/python2.4/site-packages/TracVote-0.1-py2.4.egg/tracvote/__init__.py", line 180, in render_voter
    add_script(req, \'vote/js/tracvote.js\')
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/chrome.py", line 92, in add_script
    scriptset = req.chrome.setdefault(\'scriptset\', set())
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/api.py", line 169, in __getattr__
    value = self.callbacks[name](self)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/chrome.py", line 460, in prepare_request
    self.log.info(traceback.format_stack())

Tab activation does work

File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 394, in dispatch_request
    return _dispatch_request(req, env, env_error)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/ticket/roadmap.py", line 352, in process_request
    \'ics\')
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/chrome.py", line 59, in add_link
    linkset = req.chrome.setdefault(\'linkset\', set())
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/api.py", line 169, in __getattr__
    value = self.callbacks[name](self)
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/util/compat.py", line 133, in newfunc
    return func_(*(args + fargs), **dict(kwargs, **fkwargs))
File "/usr/lib/python2.4/site-packages/Trac-0.11.1-py2.4.egg/trac/web/chrome.py", line 460, in prepare_request
    self.log.info(traceback.format_stack())

Attachments (1)

vote.diff (2.4 KB) - added by acamac 6 years ago.
Proposed Change

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by acamac

Proposed Change

comment:1 Changed 4 years ago by rjollos

  • Owner changed from athomas to rjollos

Reassigning ticket to new maintainer.

comment:2 Changed 4 years ago by rjollos

  • Summary changed from Wiki mainnav tab does not activate correctly to [Patch] Wiki mainnav tab does not activate correctly

comment:3 Changed 4 years ago by rjollos

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

Issue seems to be resolved in latest 0.11 version. Please reopen if you find this is not the case.

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.