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

Changes made to Custom Tag won't be saved after editing

    Details

      Description

      Adding custom tag inside RichText will be saved correctly on create, but all attempts on editing values of the said custom tag will fail (changes to the custom tag won't be stored).

      Step 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. In said article in Intro field add testct custom tag with value: Test 1.
      4. Publish Article
      5. Edit same Article
      6. Edit testct custom tag inside Intro field. Change its value to Test 2.
      7. Press Publish

      Result
      In the new version of Article custom tag testct inside Body field will still have a value of Test 1.

        Issue Links

          Activity

          Mateusz Bieniek created issue -
          Mateusz Bieniek made changes -
          Field Original Value New Value
          Description Adding custom tag inside RichText will be saved correctly on create, but all attempts on editing values of the said custom tag will fail (changes to the custom tag won't be stored).

          *Step to reproduce*
          1. Clean installation of eZ Platform 2.4
          2. Add {{testct}} custom tag to {{ezplatform.yml}}:
          {code}
          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
          {code}
          and enable it for RichText:
          {code}
          ezpublish:
              #...
              system:
                  default:
                      fieldtypes:
                          ezrichtext:
                              custom_tags: [testct]
          {code}
          And create {{AppBundle:custom_tag:test.html.twig}} template file containing:
          {code}
          {{ params.some_text }}
          {code}
          3. Create a new Article. In said article in Intro field add {{testct}} custom tag with value: {{Test 1}}.
          4. Publish Article
          5. Edit same Article
          6. Edit {{testct}} custom tag inside Intro field. Change its value to {{Test 2}}.
          7. Press Publish

          *Result*
          In the new version of Article custom tag {{testct},} inside Body field will still have a value of {{Test 1}}.
          Adding custom tag inside RichText will be saved correctly on create, but all attempts on editing values of the said custom tag will fail (changes to the custom tag won't be stored).

          *Step to reproduce*
          1. Clean installation of eZ Platform 2.4
          2. Add {{testct}} custom tag to {{ezplatform.yml}}:
          {code}
          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
          {code}
          and enable it for RichText:
          {code}
          ezpublish:
              #...
              system:
                  default:
                      fieldtypes:
                          ezrichtext:
                              custom_tags: [testct]
          {code}
          And create {{AppBundle:custom_tag:test.html.twig}} template file containing:
          {code}
          {{ params.some_text }}
          {code}
          3. Create a new Article. In said article in Intro field add {{testct}} custom tag with value: {{Test 1}}.
          4. Publish Article
          5. Edit same Article
          6. Edit {{testct}} custom tag inside Intro field. Change its value to {{Test 2}}.
          7. Press Publish

          *Result*
          In the new version of Article custom tag {{testct}} inside Body field will still have a value of {{Test 1}}.
          Mateusz Bieniek made changes -
          Status Open [ 1 ] Confirmed [ 10037 ]
          Mateusz Bieniek made changes -
          Status Confirmed [ 10037 ] InputQ [ 10001 ]
          Mateusz Bieniek made changes -
          Link This issue relates to CS-7216 [ CS-7216 ]
          Mateusz Bieniek made changes -
          Link This issue relates to EZP-30032 [ EZP-30032 ]
          Barbara Grajczyk made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Assignee Barbara Grajczyk [ barbara.grajczyk@ez.no ]
          Barbara Grajczyk made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Barbara Grajczyk made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Assignee Barbara Grajczyk [ barbara.grajczyk@ez.no ]
          Barbara Grajczyk made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Mateusz Bieniek made changes -
          Assignee Barbara Grajczyk [ barbara.grajczyk@ez.no ] Mateusz Bieniek [ mateusz.biniek@ez.no ]
          Show
          Barbara Grajczyk added a comment - PR: https://github.com/ezsystems/ezplatform-admin-ui/pull/833 PR merged: https://github.com/ezsystems/ezplatform-admin-ui/commit/c9f3de8d398679e1b7876fef06f196729e0e3dba
          Hide
          Barbara Grajczyk added a comment -

          Tested successfully with patch for v2.4.1

          Show
          Barbara Grajczyk added a comment - Tested successfully with patch for v2.4.1
          Barbara Grajczyk made changes -
          Assignee Mateusz Bieniek [ mateusz.biniek@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Fix Version/s 2.5.0-beta1 [ 15102 ]
          Fix Version/s 2.4.2 [ 15111 ]
          Resolution Fixed [ 1 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          1m 30s 1 mateusz.biniek@ez.no 14/Jan/19 1:02 PM
          Confirmed Confirmed InputQ InputQ
          5s 1 mateusz.biniek@ez.no 14/Jan/19 1:02 PM
          InputQ InputQ Development Development
          29d 24m 1 Barbara Grajczyk 12/Feb/19 1:27 PM
          Development Development Development Review Development Review
          16s 1 Barbara Grajczyk 12/Feb/19 1:27 PM
          Development Review Development Review Documentation Review done Documentation Review done
          6s 1 Barbara Grajczyk 12/Feb/19 1:27 PM
          Documentation Review done Documentation Review done QA QA
          7s 1 Barbara Grajczyk 12/Feb/19 1:27 PM
          QA QA Closed Closed
          1h 17m 1 Barbara Grajczyk 12/Feb/19 2:45 PM

            People

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

              Dates

              • Created:
                Updated:
                Resolved: