3

I'm currently working with Magento2 (I'm an absolut beginner with this) and I need to adjust the template of a widget to my requirements. So I found the appropiate .phtml file used by that widget and added a simple div to see where this will get rendered (note that there is only one template file in the whole widget).

Unfortunately, this little change is not applied on the frontend. Things I did so far:

  • Flushing Magento Cache (both from backend, as well as from commandline, although there should be no difference)
  • Clearing Magento Cache (see above)
  • Manually removing the var/cache directory
  • Deploying the static content from commandline
  • Related to other SO-questions I disabled my browser-cache

Neither of that worked, the added div is not displayed on the frontend. What am I missing here?

1 Answer 1

2

I figured this already out by myself. The problem was that changes to widgets are not applied unless the widgets version has changed. Steps to solve the problem:

  • Apply your changes to the widget
  • Change setup_version in path/to/widget/etc/module.xml (decrementing will result in an error)
  • Run php bin/magento setup:upgrade from the root directory
  • Run php bin/magento setup:static-content:deploy or setup:di:compile, depending on what you've changed.

Your Answer

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

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