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

Publishing Article containing Custom Tag inside Intro field results in broken Custom Tag and error

    XMLWordPrintable

    Details

      Description

      Publishing Article containing Custom Tag inside Intro field results in broken Custom Tag and error when only required fields are set. Putting a value in all fields (Title, Short Title, Intro, Body) and publishing will not produce this error.

      Steps to reproduce
      1. Clean installation of eZ Platform 2.4
      2. Add testct custom tag to ezplatform.yml:

      ezrichtext:
          custom_tags:
              testct:
                  template: 'AppBundle:custom_tag:test.html.twig'
                  icon: '/bundles/ezplatformadminui/img/ez-icons.svg#error'
                  attributes:
                      some_text:
                          type: 'string'
                          required: true
      

      and enable it for RichText:

      ezpublish:
          #...
          system:
              default:
                  fieldtypes:
                      ezrichtext:
                          custom_tags: [testct]
      

      And create AppBundle:custom_tag:test.html.twig template file containing:

      {{ params.some_text }}
      

      3. Create a new Article. Fill Short title, click inside Intro field, click button and add testct custom tag with value: Test 1. Leave other non-required fields blank. Do not click anywhere else.
      4. Publish Article

      Result
      Accessing View tab for said Article in BO will show a message

      RichText template tag customtag is not configured

      inside Intro field. In addition, during an edition of said Article Intro field will display orange line in a place where Custom Tag should render.

      Note
      If Body field has set any value, the issue will not occur. Also, there are other scenarios leading to this issue, but this one allows to reproduce it with 100% accuracy on a clean installation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mateusz.bieniek@ez.no Mateusz Bieniek
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: