Opened 16 years ago
Closed 16 years ago
#7756 closed defect (worksforme)
IRequestFilter post_process_request req changes not in hdf for ClearSilver
Reported by: | acamac | Owned by: | Remy Blank |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Request changes made in post_process_request are not reflected in hdf. So ClearSilver templates can not see any changes made in req.
Suggested change:
-
trac/web/main.py
197 197 resp = chosen_handler.process_request(req) 198 198 if resp: 199 199 if len(resp) == 2: # Clearsilver 200 chrome.populate_hdf(req)201 200 template, content_type = \ 202 201 self._post_process_request(req, *resp) 202 chrome.populate_hdf(req) 203 203 # Give the session a chance to persist changes 204 204 if req.session: 205 205 req.session.save()
Life Story:
I downloaded a ClearSilver plugin and attempted to use the NavControlPlugin to modify the metnav and mainnav. However the changes were not showing up for my ClearSilver generated plugin page.
Attachments (0)
Change History (8)
comment:1 by , 16 years ago
Milestone: | → 0.11.3 |
---|---|
Owner: | set to |
follow-up: 3 comment:2 by , 16 years ago
follow-up: 4 comment:3 by , 16 years ago
Replying to rblank:
(OT: A "drill-down" functionality in the annotate view would be very useful to track the history of a set of lines: view the annotated file, display the last changeset affecting the lines "inline", view the annotated file as it was right before the changeset, wash, rinse and repeat. Currently, I'm doing this by editing the URL)
Click on the nearest ellipsis corresponding to that set of lines.
follow-up: 5 comment:4 by , 16 years ago
Replying to cboos:
Click on the nearest ellipsis corresponding to that set of lines.
Not sure what you mean with "ellipsis". I had found out that clicking on a revision in the "Rev" column would open the corresponding changeset "inline". But I hadn't noticed that the headings of the line number columns in the diff had links to the revisions, so this allows drilling down as I wanted. I assume this is what you meant.
Funnily, your comment:3 didn't appear in my RSS reader. It's in the timeline, so it's probably a problem on my side.
follow-up: 6 comment:5 by , 16 years ago
Replying to rblank:
Replying to cboos:
Click on the nearest ellipsis corresponding to that set of lines.
Not sure what you mean with "ellipsis". I had found out that clicking on a revision in the "Rev" column would open the corresponding changeset "inline". But I hadn't noticed that the headings of the line number columns in the diff had links to the revisions, so this allows drilling down as I wanted.
The heading containing the rev number will position you to the first chunk, but if you have multiple chunks, they will be separated by an empty row, the heading of such separators contains an ellipsis, and clicking on that ellipsis will position you to the corresponding chunk.
I think we should add a title attribute to that link (and maybe even a help line somewhere) in order to make this more discoverable.
follow-up: 7 comment:6 by , 16 years ago
Replying to cboos:
The heading containing the rev number will position you to the first chunk, but if you have multiple chunks, they will be separated by an empty row, the heading of such separators contains an ellipsis, and clicking on that ellipsis will position you to the corresponding chunk.
Aahh… That's indeed very well hidden :-)
Apart from that, any on-topic comments on the patch above?
follow-up: 8 comment:7 by , 16 years ago
Replying to rblank:
Replying to cboos:
The heading containing the rev number will position you to the first chunk, but if you have multiple chunks, they will be separated by an empty row, the heading of such separators contains an ellipsis, and clicking on that ellipsis will position you to the corresponding chunk.
Aahh… That's indeed very well hidden :-)
Indeed, power-user only ;-)
Apart from that, any on-topic comments on the patch above?
Well, from my side, ClearSilver is largely unsupported. Doing changes at that level is risky, as we're not using it anymore at large, and when changing something like proposed here, you may risk to get unwanted side effects.
Especially when, as you said in comment:1, it has always been like that. One can easily imagine that other request post processors would expect to have the HDF populated at the point they're called. The OP could eventually use the request pre processing step to achieve what he wanted. Anywyay, for me, it's not the time to change anymore the behavior of Trac w.r.t ClearSilver, so I'd suggest wontfix.
comment:8 by , 16 years ago
Milestone: | 0.11.3 |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Replying to cboos:
… One can easily imagine that other request post processors would expect to have the HDF populated at the point they're called. The OP could …
Or simpler, the OP could actually just modify the HDF directly, the way he wants.
I understand the problem, but I'm not sure about the implications of the proposed change. Browsing the history of
main.py
, I can see thatchrome.populate_hdf(req)
has always been placed before the post-process handler call.Could somebody who is familiar with ClearSilver and
IRequestFilter
comment on this?(OT: A "drill-down" functionality in the annotate view would be very useful to track the history of a set of lines: view the annotated file, display the last changeset affecting the lines "inline", view the annotated file as it was right before the changeset, wash, rinse and repeat. Currently, I'm doing this by editing the URL)