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?
3 Answers 3
Define This in module.xml
<sequence>
<module name="Magento_Theme"/>
</sequence>
-
This seemed to work! Can you explain I had to add this?Greg– Greg2019年06月20日 11:22:52 +00:00Commented Jun 20, 2019 at 11:22
-
1its specify for load orderRonak Rathod– Ronak Rathod2019年06月20日 11:25:42 +00:00Commented Jun 20, 2019 at 11:25
-
1devdocs.magento.com/guides/v2.3/extension-dev-guide/build/…Ronak Rathod– Ronak Rathod2019年06月20日 11:27:30 +00:00Commented Jun 20, 2019 at 11:27
-
Great. Thank you! Lesson learned!Greg– Greg2019年06月20日 11:35:50 +00:00Commented Jun 20, 2019 at 11:35
-
most welcome happy coding....:)Ronak Rathod– Ronak Rathod2019年06月20日 11:36:16 +00:00Commented Jun 20, 2019 at 11:36
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
-
1thank you for your answer! I found a solution in the accepted answer.Greg– Greg2019年06月20日 11:23:40 +00:00Commented Jun 20, 2019 at 11:23
You can extend the ui_component using a custom module.
- So create a
Vendor/Module. (registration, etc/module.xml, composer.json) - 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
-
1thank you for your answer! I found a solution in the accepted answer.Greg– Greg2019年06月20日 11:23:38 +00:00Commented Jun 20, 2019 at 11:23
Explore related questions
See similar questions with these tags.