Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-5257

Custom tags with empty values are corrupted after upgrading from v3 to v4.4

    XMLWordPrintable

Details

    • Yes

    Description

      Steps to reproduce

      1. Install Ibexa DXP v4
      2. Create an article with a Twitter tag
      3. Publish
      4. Edit in the database field with the Twitter tag and change XML to this:
      <?xml version="1.0" encoding="UTF-8"?>
      <section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" xmlns:ezcustom="http://ez.no/xmlns/ezpublish/docbook/custom" version="5.0-variant ezpublish-1.0"><para> </para><eztemplate name="eztwitter" ezxhtml:class="ez-custom-tag ez-custom-tag--attributes-visible"><ezcontent><para> </para></ezcontent><ezconfig><ezvalue key="tweet_url">https://twitter.com/RaftSurvivaGame</ezvalue><ezvalue key="theme">light</ezvalue><ezvalue key="width">500</ezvalue><ezvalue key="lang">en</ezvalue><ezvalue key="dnt">true</ezvalue></ezconfig></eztemplate></section> 
      1. Edit added article
      2. Try to show information about the Twitter tag

       

      Result

      ibexa-richtext-onlineeditor-js.js:94475 Uncaught TypeError: Cannot read properties of undefined (reading 'text')
          at normalize (ibexa-richtext-onlineeditor-js.js:89482:18)
          at new Template (ibexa-richtext-onlineeditor-js.js:88306:50)
          at normalize (ibexa-richtext-onlineeditor-js.js:89507:29)
          at new Template (ibexa-richtext-onlineeditor-js.js:88306:50)
          at normalize (ibexa-richtext-onlineeditor-js.js:89507:29)
          at new Template (ibexa-richtext-onlineeditor-js.js:88306:50)
          at normalize (ibexa-richtext-onlineeditor-js.js:89507:29)
          at new Template (ibexa-richtext-onlineeditor-js.js:88306:50)
          at IbexaCustomTagFormView.setTemplate (ibexa-richtext-onlineeditor-js.js:93035:23)
          at IbexaCustomTagFormView.setValues (ibexa-richtext-onlineeditor-js.js:108671:12) 

      Expected

      Viewing the information should not cause any errors, and editing any parameters should work as well

       

      Note

      You can achieve this same result if you create the Twitter tag in v3.3 and upgrade the platform to v4.4.

      in v3, empty element values were not added to XML, from v4 all values are added to XML even empty value

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              mateusz.debinski@ibexa.co Mateusz Dębiński
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: