0

Magento2: Invalid template file: 'Magento_Catalog::suncare/tabs.phtml' in module: '' block's name 'magento\framework\view\element\template_4' [] []

facing this error how to resolve this?

Thanks for helping

2 Answers 2

0

Yes, This is the problem with windows. Windows uses "" as separator, the array "directories" contains entries with "/" as separator, so the check will always fail. So you need to fix this by replacing the separator in core file:

Magento\Framework\View\Element\Template\File\Validator 

function isPathInDirectories replace below code in isPathInDirectories function

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path)); 
3
  • But, I'm working on linux not windows or any windows server Commented Oct 18, 2021 at 11:35
  • Okay You do any customization or it's coming from vendor folder? Commented Oct 18, 2021 at 11:39
  • 1
    Ok I have found, it was generating due to my customization, Thanks Commented Oct 18, 2021 at 11:55
0

suncare/tabs.phtml was not exist and called somewhere in module layout

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.