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

Preview not being updated in backend if you use cache-blocks

    XMLWordPrintable

Details

    Description

      If you edit a content in a backend and the template in question has a cache-block, the preview won't be updated.

      Steps to Reproduce

      1. Change ezpublish.yml and set your frontend siteaccess to have legacy_mode: true
      2. Edit your design Full\Article template and add a cache block around the body attribute
        {set-block scope=root variable=cache_ttl}0{/set-block}
        {cache-block keys=$node.contentobject_id expiry=0 ignore_content_expiry subtree_expiry=$node.node_id}
        	{if $node.data_map.body.content.is_empty|not}
        		<div class="attribute-long">
        			{attribute_view_gui attribute=$node.data_map.body}
        		</div>
        	{/if}
        {/cache-block}
        
      3. Clear the caches
      4. Edit an existent article, and change the body.
      5. Preview
      6. Go back to edit
      7. Edit that article again, and change the body again.
      8. Preview

      You won't be able to see content changes this time

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 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 - 1 hour
                1h