How to fix the «Invalid template file» / «require_js.phtml» failure of Magento 2.2.7 in Windows?

bug
filesystem
windows
bug-fix
magento22
magento227

(Dmitry Fedyuk) #1

Replace the line:

with the following code block:

if (0 === strpos(
	$this->fileDriver->getRealPath($path), $this->fileDriver->getRealPath($directory))
) {

How to fix the «Invalid template file» / «require_js.phtml» failure of Magento 2.3.0 in Windows?
(Dmitry Fedyuk) #2

See also: How to fix the «Invalid template file» / «require_js.phtml» failure of Magento 2.3.0 in Windows?