In my custom theme, I added custom template for which I am getting invalid template file error in system.log. My xml file loctaion:
app/design/frontend/{vendor}/{theme}/Magento_catalog/layout/catalog_product_view.xml
My template file location
app/design/frontend/{vendor}/{theme}/Magento_catalog/templates/product/view/size_guide.phtml
catalog_product_view.xml
<?xml version="1.0"?>
<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.details">
<block class="Magento\Catalog\Block\Product\View\Description" name="size_guide" template="Magento_Catalog::product/view/size_guide.phtml" group="detailed_info">
<arguments>
<argument name="title" translate="true" xsi:type="string">Size Guide</argument>
</arguments>
</block>
</referenceBlock>
<!-- this is code to add new tab end -->
</body>
</page>
size_guide.phtml
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('size_guide')->toHtml(); ?>
Magento looks for the template file in module-catalog and gives the error when not found. Why does Magento not pick up the template file from my theme?