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

    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.

        Issue Links

          Activity

          Hide
          Björn Köster added a comment -

          He do have this issue too. We are able to reproduce this

          Show
          Björn Köster added a comment - He do have this issue too. We are able to reproduce this
          Show
          Mateusz Bieniek added a comment - PR: https://github.com/ezsystems/ezplatform-admin-ui/pull/833
          Show
          Barbara Grajczyk added a comment - PR merged: https://github.com/ezsystems/ezplatform-admin-ui/commit/c9f3de8d398679e1b7876fef06f196729e0e3dba
          Hide
          Barbara Grajczyk added a comment -

          Tested successfully with patch on v2.4.1

          Show
          Barbara Grajczyk added a comment - Tested successfully with patch on v2.4.1

            People

            • Assignee:
              Unassigned
              Reporter:
              Mateusz Bieniek
            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: