I have been reading the forum but I can't find any solution to solve my case.
I have a custom module where I'm getting the error:
1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'simulator.phtml' in module: '' block's name: 'product.view.simulator'
My module works with Magento 2.2 but after upgrade to 2.3 it does not work. I use Mac & docker(Image:alexcheng/magento2:latest), no windows. I think the problem is in the symlink which is not getting the right path.
catalog_product_view.xml (I have tried with template set to :simulator.phtml but it doesn't work)
I hace tried changing the module location:
vendor//magento-2x/.. or app/code/...
but it now works
<?xml version="1.0"?> <page xmlns :xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="product.info.addtocart"> <block class="<vendor>\<module_name>\Block\Product\Simulator" name="product.view.simulator" as="product_simulator" template="simulator.phtml"/> </referenceBlock> </body> </page>
Thanks in advance.
Solution: The problem was solved enabling symlinks to template(Advance->Developer in magento admin panel), but I have read that it's dangerous :S