Details
Description
Steps to reproduce:
- Create document A.Sheet (terminal) with the content:
{{velocity}} Sheet says: #if ($xcontext.action == 'view') $doc.content #end {{/velocity}}
- Create document A.WebHome with the content:
Hello World!
- Edit A.WebHome in object mode and add a DocumentSheetBinding to "Sheet"
- View the document A.WebHome and observe the sheet displaying the content:
Sheet says: Hello World!
- View the history of document A.WebHome and click on a revision (e.g. the most recent).
- See that the content of the document is not displayed by the sheet:
Sheet says:
Since many applications end up writing sheets that check for the view action, the impact of this is quite large.
Cause identified by tmortagne.
Solutions proposed also by tmortagne:
- Deprecate the viewrev action and have the view action handle the rev parameter (and show the latest revision for an empty rev parameter value) instead of redirecting to viewrev like it does now.
- (recommended)
- Make the viewrev action set the context action to view.
Attachments
Issue Links
- is related to
-
XWIKI-5148 viewrev should be associated to the document reference instead of the context
- Open