Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
1
-
Turing Team 185
Description
- Check whether the hippo:handle is of nodetype hippo:versionInfo,if not, go to original flow.
- It checks the handle node whether the requested label has been present for the document. If not, go to original flow, if it is was, go to 3
- Check whether the document variant has property that matches the label L1. If it matches, go to original flow (variant is correct one). If not, got to 4
- If there is a property on the hippo:handle pointing to the version history node, fetch this node by the HST preview or live user, and check the version labels below that node, and find whether the right version label is present. If it isn’t present, return original flow, otherwise go to 5 with the FrozenNode we found. Unfortunately we cannot use javax.jcr.version.VersionHistory and for example javax.jcr.version.VersionHistory#hasVersionLabel(java.lang.String) because the liveuser cannot access the version history. This does mean we inspect version history nodes ourselves in HST and implement #hasVersionLabel ourselves instead of using the JCR spec. This is unfortunate but preferable above using a previewuser session in live requests.
- Return a proxy around the FrozenNode making it
- A HippoNode instance (frozen nodes from Repository are not decorated)
- A node behaving as-if it was located in the workspace
- Return a HippoBean object for the proxy node returned from 6
Note that above step 1, 2 and 3 are essential performance optimizations: We do not want to check version history for every document if, say, the Christmas Campaign is running: It doesn’t make sense to do that for, say, 10.000 of old news articles.
Note for this issue also integration tests that really mimic an HST request with liveuser and one for previewuser must be added
Attachments
Issue Links
- causes
-
CMS-13133 Inconsistent behavior in the preview of projects
- Closed
- is awaited by
-
CHANNELMGR-1936 Campaigns - CM - As a user, when opening a channel, and a project is selected, then documents that have a version related to the project are shown instead of the core version.
- Closed
- relates to
-
HSTTWO-4304 Support rendering versioned documents
- Closed