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

Cannot use custom attribute of type choice with link

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 4.6.0-beta5
    • 4.6.0-beta4
    • Content

    Description

      Cannot use custom attribute of type choice with link.

      Steps:

      1. Add config with
                    fieldtypes:
                        ezrichtext:
                            attributes:
                                link:
                                    another-attribute:
                                        type: choice
                                        choices: [ attr1, attr2 ]
                                        default_value: attr2
                                        required: false
                                        multiple: true
        
      2. Reload cache.
      3. Edit article.
      4. Check RTE field.

      Actual result: Field is disable, error occurs in console

      Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
          at IbexaLinkFormView.createDropdown (ibexa-richtext-onlineeditor-js.js:112542:22)
          at ibexa-richtext-onlineeditor-js.js:112517:31
          at Array.forEach (<anonymous>)
          at IbexaLinkFormView.createFromAttributesChildren (ibexa-richtext-onlineeditor-js.js:112508:42)
          at new IbexaLinkFormView (ibexa-richtext-onlineeditor-js.js:112330:38)
          at IbexaLinkUI.createFormView (ibexa-richtext-onlineeditor-js.js:111981:22)
          at new IbexaLinkUI (ibexa-richtext-onlineeditor-js.js:111965:28)
          at ibexa-richtext-onlineeditor-js.js:8478:46
          at Array.map (<anonymous>)
          at loadPlugins (ibexa-richtext-onlineeditor-js.js:8476:35)
      

      Expected result: Type choice can be used

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              michal.szoltysek@ibexa.co Michał Szołtysek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: