Details
-
Bug
-
Resolution: Fixed
-
High
-
5.2
Description
If you remove an embed image of a Content Object (let's say and article) and try to display that content, eZ will crash with a fatal error.
This will only happen in PROD environment.
"Could not find 'Content' with identifier 'array ( 'id' => '60', 'languages' => NULL, 'versionNo' => NULL, )'" eZ\\Publish\\Core\\Base\\Exceptions eZ\\Publish\\Core\\Base\\Exceptions
[2014-10-27 10:41:31] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template (
) in "EzPublishCoreBundle::content_fields.html.twig"." at /var/www/ezp.pt/520/vendor/twig/twig/lib/Twig/Template.php line 146 {
"exception":"[object] (Twig_Error_Runtime: An exception has been thrown during the rendering of a template (\"Could not find 'Content' with identifier 'array (\n 'id' => '60',\n 'languages' => NULL,\n 'versionNo' => NULL,\n)'\") in \"EzPublishCoreBundle::content_fields.html.twig\".
at /var/www/ezp.pt/520/vendor/twig/twig/lib/Twig/Template.php:146,
NotFoundException: Could not find 'Content' with identifier 'array (\n 'id' => '60',\n 'languages' => NULL,\n 'versionNo' => NULL,\n)'
at /var/www/ezp.pt/520/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentService.php:377,
NotFoundException: Could not find 'content' with identifier '60'
at /var/www/ezp.pt/520/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Gateway/EzcDatabase.php:884)"}
[2014-10-27 10:41:31] security.DEBUG: Write SecurityContext in the session
Steps to Reproduce
Preparations
- Edit ezpublish.yml and add "legacy_mode: true" to site siteaccess.
- Leave Eng siteaccess with the new stack.
- Change the apache virtual host to use prod environment with SetEnv ENVIRONMENT "prod"
- Clear caches
In backoffice
- In media tab, create the new image "image #001"
- In content tab, create the new article "article #001"
- In "article #001" body, embed "image #001"
- Publish "article #001"
In frontend
In the eng (Symfony) siteaccess, eZ Will crash with a fatal error: "TwigBundle:Exception:error500.html.twig"
In site (legacy) siteaccess, eZ will gracefully ignore the missing image