2

Whenever I override a phtml file in Magento 2.1.2, the block simply disappears from the page. I've successfully copied over the files from:

vendor/magento/module-theme/view/frontend/templates/html/

over to my custom theme (copy of magento-blank) folder

/vendor/me/new-blank/Magento_Theme/templates/html/

I turn on template hints and every block that's overridden (showed up as module-theme) does not show up anymore. As an experiment, I renamed the original html folder and replaced it with a symbolic link pointing to the new folder in my theme and the blocks show up just fine and can be edited without a problem. I've tried the upgrade, compile and static-content:deploy command lines and I still have no luck.

Thank you for any assistance in advance.

0

It's not advisable to override like this. Working in vendor from the start is not going to work out and doing so could mean you losing code the next time you run composer update.

Create app/design folder and begin from there. Read all of this before proceeding: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-inherit.html

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.