0

I am trying to overwrite following file: vendor/magento/module-theme/view/adminhtml/ui_component/design_config_form.xml

The changes work when editing the file directly in vendor dir, however, I am having some problems overwriting this file.

I copied the file to following location but it just doesn't work: app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml

I ran:

rm -rf generated/code

rm -rf pub/static/* var/view_preprocessed

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento cache:clean && php bin/magento cache:flush

Nothing seems to work. What am I doing wrong?

2

Define This in module.xml

    <sequence>
        <module name="Magento_Theme"/>
    </sequence>

Component load order

1

The file has likely been copied to the wrong location. Your theme is either frontend or adminhtml so does not require that distinction in the folder structure.

So instead of app/code/Magento/Theme/view/adminhtml/ui_component/design_config_form.xml you'll need something like path/to/admin-theme/Magento_Theme/ui_component/design_config_form.xml

  • 1
    thank you for your answer! I found a solution in the accepted answer. – Greg Jun 20 at 11:23
1

You can extend the ui_component using a custom module.

  1. So create a Vendor/Module. (registration, etc/module.xml, composer.json)
  2. Extend the ui_component in your module. Vendor/Module/view/adminhtml/ui_component/ui_component_name.xml

An official example of extending the category form ui_component can be found here

An example of extending the customer_form can be found here

  • 1
    thank you for your answer! I found a solution in the accepted answer. – Greg Jun 20 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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