calling add_ctxtnav from IRequestFilter.pre_process_request breaks active flag in mainnav
|Reported by:||jeremie.allard@…||Owned by:||rblank|
Adding a local navigation item can be done by a plugin by implementing IRequestFilter and calling add_ctxtnav within pre_process_request, such as in wiki:SubversionLocationPlugin. However this causes the active flag to disappear from the main navigation bar. See for example https://weblion.psu.edu/trac/weblion/browser
To reproduce it, the easiest way is to install wiki:SubversionLocationPlugin or to do a trivial plugin that just implement IRequestFilter and call add_ctxtnav(req, 'TEST') within pre_process_request.
I think this is because the chrome property is not yet ready within the request when calling pre_process_request.
I make a small patch that fix this, but as I'm not a python expert and this involves lazy evaluation of the chrome property I'm not sure if it is right.
Change History (6)
Changed 5 years ago by Jeremie Allard <nospam@…>
comment:3 in reply to: ↑ 2 Changed 5 years ago by cboos
- Milestone 0.11.3 deleted
- Resolution set to wontfix
- Status changed from new to closed