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
    – Zahid H
    Oct 18, 2021 at 11:35
  • Okay You do any customization or it's coming from vendor folder? Oct 18, 2021 at 11:39
  • 1
    Ok I have found, it was generating due to my customization, Thanks
    – Zahid H
    Oct 18, 2021 at 11:55
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.