cancel
Showing results for 
Search instead for 
Did you mean: 

After Successful Installation Magento Getting Blank Gray page for Admin

SOLVED

After Successful Installation Magento Getting Blank Gray page for Admin

Getting Blank Page Like this after Installing Magento Successfully Iam not able to track where it was gone wrong anyone could you please help me with this

 

enter image description here

 

This is the Front end screen iam able to see even i installed with sample data

 

enter image description here

1 ACCEPTED SOLUTION

Accepted Solutions

Re: After Successful Installation Magento Getting Blank Gray page for Admin

After facing same issue looking into the error area. 

found a solution and it working for me.

...\vendor\magento\framework\View\Element\Template\File\Validator.php

A function isPathInDirectories added a line

$realPath = str_replace('\\', '/', $realPath);

or refer below code function  

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    $realPath = $this->fileDriver->getRealPath($path);
    $realPath = str_replace('\\', '/', $realPath); // extra code added
    foreach ($directories as $directory) {
        if (0 === strpos($realPath, $directory)) {
            return true;
        }
    }
    return false;
}

It's working.
@saiorkrish if issue solved,Click Kudos & Accept as Solution.

 

View solution in original post

31 REPLIES 31

Re: After Successful Installation Magento Getting Blank Gray page for Admin

Hi @saiorkrish

 

Do you have .htaccess file in your root directory of magento 2 ?

 

also please check in var/log directory - any log is there or not ? if yes then post the error over here so its help us to troubleshoot the issue !

if issue solved,Click Kudos & Accept as Solution

Re: After Successful Installation Magento Getting Blank Gray page for Admin

Yes i have the .htaccess file in root directory Attaching the System.log

 

[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-12-02 23:50:41] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-12-02 23:50:50] main.ERROR: The path "tmp\alternative-source-css.lock://D:/xampp/htdocs/var/" is not writable. [] []
[2018-12-02 23:50:50] main.CRITICAL: The path "tmp\alternative-source-css.lock://D:/xampp/htdocs/var/" is not writable. [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-12-02 23:50:54] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-12-02 23:50:56] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/wysiwyg/active_editor.phtml' in module: 'Magento_Ui' block's name: 'theme.active.editor' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-translation/view/base/templates/translate.phtml' in module: 'Magento_Translation' block's name: 'translate' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/components.phtml' in module: '' block's name: 'head.components' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/js/calendar.phtml' in module: '' block's name: 'head.calendar' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-ui/view/base/templates/logger.phtml' in module: 'Magento_Ui' block's name: 'logger' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml' in module: 'Magento_Backend' block's name: 'logo' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login' [] []
[2018-12-02 23:50:57] main.CRITICAL: Invalid template file: 'D:/xampp/htdocs/vendor/magento/module-backend/view/adminhtml/templates/page/copyright.phtml' in module: 'Magento_Backend' block's name: 'copyright' [] []

 

 

Re: After Successful Installation Magento Getting Blank Gray page for Admin

I'm facing the same problem. Admin pageAdmin page

 

Re: After Successful Installation Magento Getting Blank Gray page for Admin

Facing same issue for all pages.

After install magento via web wizard (steps)  -> open homepage it working fine but some console error -> after that change the mode to developer  -> and did deployment  -> and clear cache ->then refresh the store front homepage -> getting below error. -> 

 Invalid template file: '.../vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js'

 

Re: After Successful Installation Magento Getting Blank Gray page for Admin

After facing same issue looking into the error area. 

found a solution and it working for me.

...\vendor\magento\framework\View\Element\Template\File\Validator.php

A function isPathInDirectories added a line

$realPath = str_replace('\\', '/', $realPath);

or refer below code function  

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    $realPath = $this->fileDriver->getRealPath($path);
    $realPath = str_replace('\\', '/', $realPath); // extra code added
    foreach ($directories as $directory) {
        if (0 === strpos($realPath, $directory)) {
            return true;
        }
    }
    return false;
}

It's working.
@saiorkrish if issue solved,Click Kudos & Accept as Solution.

 

Re: After Successful Installation Magento Getting Blank Gray page for Admin

Dear @kanhaiya5590 

Excellent job. All other sollution explained by others member is really just wasted my time. Specially after successful installation of magento 2.3.0 if any one see blank gray admin login page. You just follow the above solution. Do not need to anything else. All other explanation For example - running command as below is just wasting your time, such as

php bin/magento setup:static-content:deploy -f 

php bin/magento setup:upgrade

all these are nothing to do with this problem or anything about permission. 

Re: After Successful Installation Magento Getting Blank Gray page for Admin

Excellent. It worked.

Re: After Successful Installation Magento Getting Blank Gray page for Admin

It is working, thank you very much

Re: After Successful Installation Magento Getting Blank Gray page for Admin

Superb, It worked...... Thanks a Ton....