cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to open admin page after installaion of magento 2.3

Highlighted

Unable to open admin page after installaion of magento 2.3

Hi,

After installation of 2.3 on PC with XAMPP, I can open store page but can't open admin page in Chrome. The page always stays as the following photo without any error code. Cloud anyone help please? Thanks in advance. 

 

Capture.PNG

 

11 REPLIES 11
Highlighted

Re: Unable to open admin page after installaion of magento 2.3

Hello @michael_ye

 

I can not see attached image, can you please check var/logs and share here.

 

Apart from that please change the mode to the developer with below command:

php bin/magento deploy:mode:set developer
php bin/magento cache:flush

Now if there any error you can see on screen.

 

Please run below commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
sudo chmod -R 0777 var/ pub/ genrated/
Problem solved? Click Kudos & Accept as Solution!
Highlighted

Re: Unable to open admin page after installaion of magento 2.3

No. I have the same problem. This solution didn't help.

Highlighted

Re: Unable to open admin page after installaion of magento 2.3

hello @Manish Mittal,

 

I changed to developer mode and got the following error messages. can you advise how to fix it? Thanks.

1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/xampp/htdocs/magento/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js'
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'C:/xampp/htdocs/magento/vendor/magento/module-backend/view/adminhtml/templates/page/js/require_js.phtml' in module: 'Magento_Backend' block's name: 'require.js'
#0 C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\Template.php(301): Magento\Framework\View\Element\Template->fetchView('C:/xampp/htdocs...')
#1 C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\AbstractBlock.php(668): Magento\Framework\View\Element\Template->_toHtml()
#2 C:\xampp\htdocs\magento\vendor\magento\framework\View\Result\Page.php(249): Magento\Framework\View\Element\AbstractBlock->toHtml()
#3 C:\xampp\htdocs\magento\vendor\magento\framework\View\Result\Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#4 C:\xampp\htdocs\magento\generated\code\Magento\Backend\Model\View\Result\Page\Interceptor.php(193): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#5 C:\xampp\htdocs\magento\vendor\magento\framework\App\Http.php(139): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#6 C:\xampp\htdocs\magento\generated\code\Magento\Framework\App\Http\Interceptor.php(24): Magento\Framework\App\Http->launch()
#7 C:\xampp\htdocs\magento\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#8 C:\xampp\htdocs\magento\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#9 {main}
Highlighted

Re: Unable to open admin page after installaion of magento 2.3

Here is the error: https://github.com/magento/magento2/issues/19480

You'll have to locate the file Validator.php with the namespace Magento\Framework\View\Element\Template\File

in your vendor dir (vendor/magento/framework/View/Element/Template/File)

and change line 138 from 

$realPath = $this->fileDriver->getRealPath($path);

to

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Be sure to clear your generated folder.

Highlighted

Re: Unable to open admin page after installaion of magento 2.3

Hi @michael_ye,

Just try this Vindel's solution But if you can't get cleared with issue just hide the first line of code and delete the '\\', in the second line of code.

 

$realPath = $this->fileDriver->getRealPath($path);

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Best regards
Madhuresan
Bootsgrid

Highlighted

Re: Unable to open admin page after installaion of magento 2.3

Hi @vindel @Yuriy@Manish Mittal

 

Thank you all for providing solutions.

 

I tried Vindel's solution now i can see admin login page. But when I logged in I only can click the "DASHBOARD" and "FIND PARTNERS & EXTENSIONS" in the left panel. All other menus don't have any response when I click them. And all the icons or logos just display a square. 

 

Please keep helping. many thanks.

Highlighted

Re: Unable to open admin page after installaion of magento 2.3

Hi michael_ye,

 

 

These are the only menu points without submenu (the others have a JavaScript triggered overlay).

Are fonts & icons loaded correctly?

Could you have a look in the network-tab of your development console in your Browser (F12) and see if all files are loaded successfully?

Highlighted

Re: Unable to open admin page after installaion of magento 2.3

Hi, 

The same problem we have faced in the ubuntu system. It's has been resolved by the below steps.

 

1. Need to give permission for the Directory from apache2. 

       etc/apache2/apache2.conf

      From 

            <Directory /var/www/>
                Options Indexes FollowSymLinks
                AllowOverride None
                Require all granted
            </Directory>

    To 

            <Directory /var/www/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
            </Directory>

2. Enable rewrite for apache2. 

    sudo a2enmod rewrite

     and restart the apache

   sudo service apache2 restart

 

 

Highlighted

Re: Unable to open admin page after installaion of magento 2.3

@vindel

I opened the developer tool in the browser and found the following errors in loading the admin page. Please can you advise how to fix them. thanks. 

 

Refused to apply style from 'http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/extjs/resources/css/ytheme-magento.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
(index):23 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/requirejs/require.js net::ERR_ABORTED 404 (Not Found)
(index):1 Refused to apply style from 'http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/jquery/jstree/themes/default/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
(index):24 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/mage/requirejs/mixins.js net::ERR_ABORTED 404 (Not Found)
(index):1 Refused to apply style from 'http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
(index):32 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/images/magento-icon.svg 404 (Not Found)
(index):24 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/mage/requirejs/mixins.js 404 (Not Found)
requirejs-config.js:70 Uncaught TypeError: require is not a function
at requirejs-config.js:70
at requirejs-config.js:77
at requirejs-config.js:512
(anonymous) @ requirejs-config.js:70
(anonymous) @ requirejs-config.js:77
(anonymous) @ requirejs-config.js:512
(index):40 Uncaught TypeError: require.config is not a function
at (index):40
(anonymous) @ (index):40
(index):64 Uncaught TypeError: require is not a function
at (index):64
(anonymous) @ (index):64
(index):306 Uncaught TypeError: require is not a function
at (index):306
(anonymous) @ (index):306
(index):457 Uncaught TypeError: require is not a function
at (index):457
(anonymous) @ (index):457
(index):502 Uncaught TypeError: require is not a function
at (index):502
(anonymous) @ (index):502
(index):543 Uncaught TypeError: require is not a function
at (index):543
(anonymous) @ (index):543
(index):566 Uncaught TypeError: require is not a function
at (index):566
(anonymous) @ (index):566
(index):589 Uncaught TypeError: require is not a function
at (index):589
(anonymous) @ (index):589
2(index):39 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/fonts/opensans/regular/opensans-400.woff2 net::ERR_ABORTED 404 (Not Found)
(index):229 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/fonts/opensans/bold/opensans-700.woff2 net::ERR_ABORTED 404 (Not Found)
(index):39 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/fonts/opensans/semibold/opensans-600.woff2 net::ERR_ABORTED 404 (Not Found)
4(index):1 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/fonts/opensans/regular/opensans-400.woff net::ERR_ABORTED 404 (Not Found)
favicon.ico:1 GET http://localhost/magento/pub/static/version1543705601/adminhtml/Magento/backend/en_US/Magento_Theme/favicon.ico 404 (Not Found)