Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.2, 2014.01
-
None
-
eZ Publish 5.2
Description
If "internal_link" is an Object Relation field, and you use this in your Twig template:
{% if ez_is_field_empty( content, 'internal_link' ) %}
This works before the field has content. However, it breaks if the field had content and then the content was removed.
Steps to reproduce:
1. Create a class that contains an attribute of type "Object Relation";
2. Create an object for the new class, but leave the "Object Relation" field empty;
3. On a test Twig template, use ez_is_field_empty() to check the above field. It will return "true", as expected;
4. Edit the object and now link the "Object Relation" field to an existing content. ez_is_field_empty() will return "false", as expected;
5. Now clear the "Object Relation" field. ez_is_field_empty() will return "false", which is wrong. The field is now empty, so it should return "true".
Attachments
Issue Links
- links to