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

Displaying an empty XMLText field outputs eZXML

    Details

      Description

      Title says it all.

      Empty XMLText field:

      <?xml version="1.0" encoding="utf-8"?><section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"/>
      

      Should output an empty string instead of this very eZXML string.

        Issue Links

          Activity

          Hide
          Jérôme Vieilledent (Inactive) added a comment - - edited

          A workaround would be to test if field is empty before rendering it:

          {% if not ez_is_field_empty( content, 'my_xmltext_field' ) %}
              {{ ez_render_field( content, 'my_xmltext_field' ) }}
          {% endif %}
          

          Show
          Jérôme Vieilledent (Inactive) added a comment - - edited A workaround would be to test if field is empty before rendering it: {% if not ez_is_field_empty( content, 'my_xmltext_field' ) %} {{ ez_render_field( content, 'my_xmltext_field' ) }} {% endif %}
          Show
          Petar Spanja (Inactive) added a comment - Pull request: https://github.com/ezsystems/ezpublish-kernel/pull/1208
          Show
          Petar Spanja (Inactive) added a comment - Fixed in ezpublish-kernel/master: https://github.com/ezsystems/ezpublish-kernel/commit/b4767d76882107aa7be143de002c4d2a8bfd932d
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jérôme Vieilledent (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, 45 minutes
                1h 45m