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

Taxonomy validation causes JS error

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 4.4.3
    • 4.4.2
    • None
    • None
    • Ibexa v4.4.2 experience

    • Ibexa Experience
    • Yes

    Description

      • If a content type a content type has both ibexa_taxonomy_entry_assignment and ibexa_taxonomy_entry field, then in Page builder on publish there are JS errors that block publishing the content
      • A new ibexa_taxonomy_entry_assignment.js was intoduced in 4.4.2 (we checked 4.4.1 and it's not  there), it's compiled to the ibexa-admin-ui-content-edit-parts-js.js
      • In this ibexa_taxonomy_entry_assignment.js there is a SELECTOR_FIELD and a SELECTOR_INPUT defined.
      • SELECTOR_INPUT matches the input of the ibexa_taxonomy_entry type too, not just the one of ibexa_taxonomy_entry_assignment, but that one has no container with the SELECTOR_FIELD class.
      • That will result an error page.builder.fields.config.panel.js, where the fieldContainer is going to be null in this line (see image attached):
        const fieldContainer = validator.getFieldTypeContainer(fieldToValidate.item.closest(fieldSelector));
      • Fix seems to be easy in ibexa_taxonomy_entry_assignment.js by changing
        selector: SELECTOR_INPUT,
        to
        selector: `${SELECTOR_FIELD} ${SELECTOR_INPUT}`,
        as I see many fieldtypes use this approach for the selector.

      Note:
      The same problem occurs outside of the Page Builder.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              27a86f72-3731-445b-a7d6-4e400f95824e@accounts.ibexa.co Gábor Balogh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: