Details
-
Bug
-
Resolution: Fixed
-
High
-
5.2, 5.3-dev
-
None
-
eZ Publish 5.2, EZSP-004-EZP5.2, eZ Demo
Description
Using the Symfony stack, when previewing a content in edit mode, both 'content.contentInfo.mainLocationId' and 'content.versionInfo.contentInfo.mainLocationId' are NULL.
Steps to reproduce:
On eZ Publish 5.2, fully patched (including EZSP-004-EZP5.2), with eZ Demo (also happens on master once EZP-22477 fixed on worked around ):
1. Edit a suitable template - e.g. /vendor/ezsystems/demobundle/EzSystems/DemoBundle/Resources/views/full/article.html.twig - and add:
{{ dump(content.contentInfo.mainLocationId) }} {{ dump(content.versionInfo.contentInfo.mainLocationId) }} {{ dump(location.contentInfo.mainLocationId) }}
2. On admin interface, edit an existing article (e.g. /Getting-Started/Selected-Features/Getting-Started-with-eZ-Publish-Platform);
3. Click on "preview" button. You should see:
NULL NULL string(2) "73"
...which is wrong, since both 'content.contentInfo.mainLocationId' and 'content.versionInfo.contentInfo.mainLocationId' are NULL. 'location.contentInfo.mainLocationId' returns the correct value, though.