The scenario: All staff have "View any unpublished". They edit a node a few times, publish it, then un-publish it (because they decide it’s not ready). Then they edit a few more revisions. Now they want to send it to someone who only has view permission for review before making it public again.
This is the problem: When they go to view the node they see the version that was at one time published. Therefore in view mode some of the recent changes are not visible. Viewing the latest revision in the revision tab doesn’t see to be a workaround, if the latest revision is selected we still see the latest published version – and the route is exactly the same as the "view" route.
I think there may be a core bug for this already but I can’t locate it.
I have run this through the debugger and I can see the revision id’s being swapped out. I didn’t get time to figure out the logic completely.
I started to think it might be related to Update access is broken on sites using node access records and node grants from Workbench Moderation, which was the original source of the View all unpublished permission. I tried making a view of all revisions to see if I could find a problematic revision id with no success. On some nodes all revisions are unpublished but we do not see the latest one on the "View" route. I also tried the workspaces module since that would be very close to what we need here but that seemed to cause other issues of a similar nature. I had one node that wouldn’t save at all with workspaces enabled due to some validation around publication status.
How can I make this scenario work for the editors with the View all unpublished permission?