Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23523

Remove an embed image will cause fatal error when displaying content

    XMLWordPrintable

Details

    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.


      [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 (

      "Could not find 'Content' with identifier 'array ( 'id' => '60', 'languages' => NULL, 'versionNo' => NULL, )'"



      ) 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,

      eZ\\Publish\\Core\\Base\\Exceptions
      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,

      eZ\\Publish\\Core\\Base\\Exceptions
      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 30 minutes
                3h 30m