Details
-
Bug
-
Resolution: Unresolved
-
High
-
None
-
1.4.2, 1.5.1
Description
in preview mode if Selection filed is empty (ezselection) this give an error:
Key "0" does not exist as the array is empty in EzPublishCoreBundle::content_fields.html.twig at line 170
500 Internal Server Error - Twig_Error_Runtime
Frontend doesnt output the error using {{ content.getFieldValue('SELECTION-FILED-NAME') }}
Error demo at:
http://www.screencast.com/t/lV6J9ieLlDz
fixing the Problem adding following condition in :
/ezpublish-kernel/eZ/Bundle/EzPublishCoreBundle/Resources/views/content_fields.html.twig
Line 170.
{% elseif not fieldSettings.isMultiple and field.value.selection.0 is defined %}