2

Hi there we had a problem with page builder on custom entity on magento2.

  <field name="description">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">textarea</item>
                    <item name="formElement" xsi:type="string">wysiwyg</item>
                    <item name="label" xsi:type="string" translate="true">Description</item>
                    <item name="code" xsi:type="string">description</item>
                    <item name="source" xsi:type="string">job</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="wysiwyg" xsi:type="boolean">true</item>
                    <item name="dataScope" xsi:type="string">description</item>
                    <item name="sortOrder" xsi:type="number">40</item>
                </item>
            </argument>
        </field>
    </container>

this is our container that should call the wysiwyg on a custom field called description and this field should use the default page builder functionality of magento. But when we try to open the setting button it does not work and we don' t have any logs or error.

enter image description here

The problem is that the live edit works but not the form. How can we debug this problem? Thanks for help

1 Answer 1

5

In my case I needed to add update handles for styles and editor for the layout file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="styles"/>
    <update handle="editor"/>
    <referenceBlock name="content">
        <uiComponent name="custom_entity_form"/>
    </referenceBlock>
</page>
3
  • thanks in my case pagebuilder edit button did not work, but I forgot these update handles! Jan 13, 2022 at 13:52
  • Maybe dumb question here, but in which layout file do you add the editor update handle ? I have this issue now Jun 1 at 10:49
  • The layout that is responsible for your page render that has the page builder field. For example for cms page edit view page is responsible vendor/magento/module-cms/view/adminhtml/layout/cms_page_edit.xml layout file, and since cms page has the page builder field it has the update handle for the editor. Jun 2 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.