If the Content Object (eg. File) is embedded using Rich Text Field into another Content Object (eg. Folder) and the former is deleted (moved to trash), then displaying the Folder Content Object in the front-office should not include the deleted File Content Object. This is the legacy behaviour (which can be tested in the fresh installation by skipping steps 2 and 3 from the steps to reproduce below). However, if ez_render_field is used, then the deleted Content Object is still shown. The link generated for it is not working/not correct (depending on the embedded Content Type).
There is a similar problem in the eZ Platform, but since steps to reproduce are a little different and the end result is also different, I have separated the issues. The one regarding eZ Platform can be found here:
Steps to reproduce
- Create new eZ Publish 5.4 installation.
- Add the following configuration to ezpublish/config/ezpublish.yml:
- Create AppBundle, register it and create Resources/views/full/folder.html.twig file there:
Alternatively, use the AppBundle provided as an attachment to this issue.
- In the back-office, create new Folder Content Type under "Home" named "Test Folder".
- In the Media/Files, create new File Content Type named "Test File".
- Edit the "Test Folder". In the "Description" field, embed the "Test file" using the "Insert/edit object" button from the Rich Text Editor. Publish "Test Folder".
- In the front-office, navigate to "/Test-Folder". Confirm that the embedded Content Object "Test file" is also displayed.
- In the backoffice, navigate to "Media/Files/Test file" and remove it by sending it to trash.
- In the front-office, navigate to "/Test-Folder" again. Notice that the embedded Content Object "Test file" is also displayed, despite being in the trash.
Product Support Engineer
eZ Platform Enterprise Edition v1.11 is now available, Easier to Build a Solid Content Business