Skip to content

Multiple HTML attributes not editable on Categories #38843

@adamlavery

Description

@adamlavery

Preconditions and environment

CE 2.4.7

Needs a custom category text attribute to be added that uses the WYSIWYG editor. See the web for example of how to do that.

This arose after upgrading from 2.4.3 to 2.4.7. Upgrade went through 2.4.4, 2.4.5 & 2.4.6 so no idea what version this bug appeared in.

Steps to reproduce

  1. Add a custom text category attribute e.g. https://developer.adobe.com/commerce/frontend-core/ui-components/howto/add-category-attribute/

  2. Add to the category edit page as wysiwyg i.e.

        <field name="custom_description" template="ui/form/field" sortOrder="100" formElement="wysiwyg">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="wysiwygConfigData" xsi:type="array">
                        <item name="height" xsi:type="string">100px</item>
                        <item name="add_variables" xsi:type="boolean">false</item>
                        <item name="add_widgets" xsi:type="boolean">false</item>
                        <item name="add_images" xsi:type="boolean">true</item>
                        <item name="add_directives" xsi:type="boolean">true</item>
                    </item>
                    <item name="source" xsi:type="string">category</item>
                </item>
            </argument>
            <settings>
                <label translate="true">Below Description</label>
                <dataScope>custom_description</dataScope>
            </settings>
            <formElements>
                <wysiwyg class="Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg">
                    <settings>
                        <rows>8</rows>
                        <wysiwyg>true</wysiwyg>
                    </settings>
                </wysiwyg>
            </formElements>
        </field>

  1. Try to edit the field on the category - it won't save. Note in our case our custom fields already have values that display on the frontend but do not show on the backend. Changes do not save,

  2. Change the sort order of the field to 49 and try again., This time you can edit and save the custom attribute but not the normal Description field.

  3. Change the sort order back to 100 and make the field a basic textarea field e.g.

<field name="custom_description" sortOrder="100" formElement="textarea">
    <settings>
        <dataType>string</dataType>
        <label translate="true">My Text Attribute</label>
    </settings>
</field>

Now you can edit and save the field as text.

Expected result

We are able to edit all HTML fields on the category page.,

Actual result

We can only edit the first HTML field that appears on the category page.

Additional information

Custom attribute editor empty:
image

Move custom attribute before core description, now description empty:
image

Make custom attribute a standard textarea and works ok:
image

Release note

Fix bug introduced in 2.4.? that prevents editing of additional custom HTML attributes on categories.

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.7Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions