I am trying to load a node using the revisioning module to display an unpublished piece of content, by passing a version ID to node_load()
. We also use the i18n module which may or may not have an affect on what I am trying to achieve. We are looking to implement a "preview" of a page which may be sent out to departments that do not have a user account of any sort (We do not want to create a login for this). The preview page is requested with the version &vid=12345
and a &preview
URL parameter.
At the moment, if the specific revision is not published, the preview page will load the currently published content instead of the version we are passing to node_load().
I have tried to create a preview user with view unpublished permissions, but this does not work (still loads the published content).
Is it possible to prevent the fallback and load the specific revision?
UPDATE:
Thank you for the renewed interest. So we are using the "entity_translation module" and have extended this to include the preview functionality. This allows a page URL to be called with the node id and version id. These are both passed to node_load.
The node is then displayed via calls to $output = _revisioning_view($node);
and finally drupal_deliver_page($output);
node_load()
or its function dependencies that restrict loading by the user role. Without clarity on how this preview page works, you can't get to the core of what you're asking.