Tuesday, February 25, 2020

magento 2 frontend and admin panel is not loading properly in xampp windows

Hello Friends.

I face issue that magento 2 fresh installation is not working properly in windows platform Xampp. Frontend display many css js files are missing and homepage is not loading properly. Same problem in backend also. 



Here its solution.

For Frontend :-

Go to this file : vendor\magento/framework\view\element\template\fileValidator.php

At around line 138 replace code with this one
$realPath = str_replace('\\', '/',$this->fileDriver->getRealPath($path));
 For Backend:-

Do these steps.
  1. Go to ROOT > app > etc > di.xml and edit the di.xml file.
  2. Modify it. Changing Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink To: Magento\Framework\App\View\Asset\MaterializationStrategy\Copy 
Now run these commands:
  •  php -dmemory_limit=5G bin/magento setup:upgrade
  •  php bin/magento setup:static-content:deploy -f
  •  php bin/magento c:f 
Now check it. Problem is solved.

No comments:

Post a Comment