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

[trash] Recovering a trashed item changes it location node

    XMLWordPrintable

Details

    Description

      Testing demo I've came across an weird (imho) behaviour, where I've trashed the footer, and recover it (to the same location) and demo was throwing an exception:

       An exception has been thrown during the rendering of a template ("Could not find 'location' with identifier '60'") in 
      
      "{% extends "eZDemoBundle::pagelayout.html.twig" %}
      {% block content %}
      {{ viewResult|raw }}
      {% endblock %}".
      
      500 Internal Server Error - Twig_Error_Runtime
      1 linked Exception:
          NotFoundException
      

      I know its possible to change in the twig template the location id for the new id.

      However this can happen to an object that is used across the system in multiple templates and controllers.

      Shouldn't there be an option to "undo" or restore to the exact location (id)?
      Or a warning in case the object is specific loaded.

      steps:

      1 - install demo w/o content
      2 - open demo home page
      3 - verify page displays as expected
      4 - on admin interface verify that content object "footer" as location id = 60
      5 -  trash Content object "footer"
      6 - open demo home page
      7 - verify an (expected) twig exception was thrown
      8 - on admin interface recover Content object "footer" from trash to the original location (or a new one)
      9 - verify the id as changed
      10- open demo home page
      11- verify the twig exception still happens
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            marcos.loureiro-obsolete@ez.no Marcos Loureiro (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: