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: '<module_name>' 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:Alex Cheung/magento2:latest), no windows. I think the problem is in the symlink which is not getting the right path.
File: catalog_product_view.xml
(I have tried with the template set to <module_name>: 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>
Some ideas?
Thanks in advance.
Solution: The problem was solved enabling symlinks to the template(Advance->Developer in Magento admin panel), but I have read that it's dangerous :S