Question

I'm trying to install a Magento 2.3 instance to my localhost(WAMP server) but after installation process(I use a command line to install) not Admin part or storefront part works correctly. It shows a lot of errors in a browser console and doesn't load Admin part at all and front part only partly. I'm using PHP 7.2.4 but also tried to use 7.1.16(it provides the same result). enter image description here

And a log file says:

[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-11-30 09:31:06] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-11-30 09:31:10] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] [] 
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-11-30 09:31:11] main.CRITICAL: Invalid template file: 'C:/wamp/www/magento/theme_23_final/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []

Any idea what is wrong?

Was it helpful?

Solution

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));

OTHER TIPS

I have resolved this issue, yesterday on same version : run this query in your db.

INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign', 0)
ON DUPLICATE KEY UPDATE value = 0;

Then run following command :

 bin/magento cache:clean 

In case if its not work you can see more solutions over here

i was trying to install a fresh Magento 2.3.5-p1 on Windows 7 32bit 2GB of RAM (and it's very out of date) using WAMPServer (php 7.1.16) and i run into unexpected MANY errors all of kind (if i could say) required js not loaded, poor performance .. all of them are specific and related to WINDOWS since Windows and MacOS are NOT OFFICIALLY supported as per this doc.. one of those errors is the one you described her and i confirm the @Saurabh Dwivedi's solution.

To work with Magento on Window with less pain and stress, it's recommanded to to use VM (link) or WSL with Windows 10 (link)

This issue is from windows machine. Remove antivirus and allow firewall rules. Then add file/folders permissions. Win command: takeown /F E:/xampp/htdocs/mage23 /R

Now install magento V2.3.0

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top