Question

error is template file invalid in Magento 2.3.5, so can anyone have idea then please share with me.

Invalid template file: 'Product_SizeChart::size.phtml' in module: 'Product_SizeChart' block's name: 'extra'.

<page layout="1column" 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.main">
        <block after="product.info.price" class="Product\SizeChart\Block\Display" name="extra" template="Product_SizeChart::size.phtml" /> 
        </referenceBlock>
    </body>
</page>

Thank you in Advance.

Was it helpful?

Solution

First thing may be to verify the module is active on the site: by running php bin/magento module:status

we need to see this module listed

you need to verify the file named size.phtml is within your module folder:

<magento_root>/app/code/Product/SizeChart/view/frontend/templates
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top