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

Field Definition Settings are not render if custom edit template is not defined

    XMLWordPrintable

    Details

      Description

      Default rendering of the field definition doesn't work.

      {# Default rendering #}
      {% for child in field_definition %}
          {# Iterable children means collections, they are handled in field_types.html.twig #}
          {% if not child.rendered  and child is not iterable %}
              <div{% if group_class is not empty %} class="{{ group_class }}"{% endif %}>
                  {{- form_label(child) -}}
                  {{- form_errors(child) -}}
                  {{- form_widget(child) -}}
              </div>
          {% endif %}
      {% endfor %}
      

      The child is not iterable expression in the code snippet above is always false, because child is instance of Symfony\Component\Form\FormView (which implements \IteratorAggregate)

      Moreover group_class variable is not defined.

      Ref. https://github.com/ezsystems/ezplatform-admin-ui/blob/b380a2b4601992976270e5ef3c5c8d6cc205f364/src/bundle/Resources/views/themes/admin/content_type/edit.html.twig#L116-L126

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            adam.wojs@ez.no Adam Wójs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: