0

After successfully installing Magento 2.3.0, I tried to login to the admin panel for the first time. The background color of the page that came up is grey like the Magento page, but it was a blank page. The User and Password fields don't appear.

I tried uninstalling and reinstalling 4 times. I am using WAMP on windows 10.

How do I get my login fields? Thanks

0
  1. Enable Developer mode

Using Command: php bin/Magento deploy:mode:set developer

Using Manually: Change default to developer in <installation_dir>app/etc/env.php.

<?php
return [
    ......
    'MAGE_MODE' => 'developer',
    ......
]
  1. Enable display_errors in app/bootstrap.php by uncomment as below

ini_set('display_errors', 1);

  • I changed to developer mode and uncommented the ini_set. I then cleared my browser's cache. When I tried to open my admin login page I got the following: 1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/wamp64/www/nisuhon/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' The message goes on. How can I fix this? Thanks – user75480 Dec 16 '18 at 10:37
  • Make sure require_js.phtml exists in Magento_Backend module(view/adminhtml/templates/page/js/require_js.phtml). Folder name and file names should be case sensitive. – Prema Karthik Dec 16 '18 at 16:22
  • It exists there – user75480 Dec 16 '18 at 22:09
0

check the following file,

vendor\magento\framework\View\Element\Template\File\Validator.php Than Line 139

if (0 === strpos($path, $directory)) {

Invalid template file:in Magento 2.2.7

  • I now get: Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\wamp64\www\nisuhon\vendor\magento\framework\View\Element\Template\File\Validator.php on line 6 Any ideas? Thanks – user75480 Dec 16 '18 at 22:05
  • Sometimes this issue come because of space in PHP start tag of controller facing same issue just removed whitespace in: <?php namespace App\Http\Controllers\Auth; removing the space resolved my error stackoverflow.com/questions/21433086/… – Prema Karthik Dec 17 '18 at 5:17
  • I tried removing all whitespaces manually and also used codebeautify.org I still get the same error as before, it just says line 1 instead of line 6. Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\wamp64\www\nisuhon\vendor\magento\framework\View\Element\Template\File\Validator.php on line 1 Can't understand where I'm going wrong. Any ideas? – user75480 Dec 17 '18 at 13:54
  • Even when there is nothing before the Namespace declaration I get the same error: <?php namespace Magento\Framework\View\Element\Template\File; – user75480 Dec 17 '18 at 14:14

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.