Skip to content

Issue with category_form.xml layout. Data is not retrieved from database

Field that retrieves the data, but there is no label and the issue with width

<field name="custom_category_footer_description">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="class" xsi:type="string">MagentoCatalogUiComponentCategoryFormElementWysiwyg
            </item>
            <item name="formElement" xsi:type="string">wysiwyg</item>
            <item name="label" xsi:type="string" translate="true">Custom Category Footer Description</item>
            <item name="wysiwyg" xsi:type="boolean">true</item>
            <item name="dataScope" xsi:type="string">custom_category_footer_description</item>
            <item name="sortOrder" xsi:type="number">36</item>
        </item>
    </argument>
    <formElements>
        <wysiwyg class="MagentoCatalogUiComponentCategoryFormElementWysiwyg">
            <settings>
                <rows>4</rows>
                <wysiwyg>false</wysiwyg>
            </settings>
        </wysiwyg>
    </formElements>
</field>

Field that has correct template usage, but doesn’t retrieve the data.

<field name="custom_category_footer_description" template="ui/form/field" sortOrder="36" formElement="wysiwyg">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="class" xsi:type="string">MagentoCatalogUiComponentCategoryFormElementWysiwyg</item>
            <item name="formElement" xsi:type="string">wysiwyg</item>
            <item name="label" xsi:type="string" translate="true">Custom Category Footer Description</item>
            <item name="dataScope" xsi:type="string">custom_category_footer_description</item>
            <item name="sortOrder" xsi:type="number">36</item>
        </item>
    </argument>
    <formElements>
        <wysiwyg class="MagentoCatalogUiComponentCategoryFormElementWysiwyg">
            <settings>
                <rows>4</rows>
                <wysiwyg>false</wysiwyg>
            </settings>
        </wysiwyg>
    </formElements>
</field>

What needs to be changed?