Errors and Fixes in Magento2
Errors & Fixes in Magento 2
Admin Login panel is not working
In this error, the black screen is visible when you log in to your Magento. As shown in the image below.
Fix.
To fix this error, you must go to the PATH below-
- Local Disk (c;)>xampp>htdocs>magento2>vendor>magento>framework>View>Element>Template>File
- Here you will find two files, namely - Resolver &Validator.
- Open the Validator file. For your reference, you can have a look at the image below.
You will find a code section in the image below.
To fix the error, you have to select this code and replace it with another system.
Replace the selected section with the given code. For your reference, you can see the image given below.
protected function isPathInDirectories($path, $directories) { $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path)); if (!is_array($directories)) { $directories = (array)$directories; } foreach ($directories as $directory) { if (0 === strpos($realPath, $directory)) { return true; } } return false; }
- Save the file.
- Hurray, you have fixed the error now.
- Open the Magento login page again.
- Now it must open like this if you have done everything right.
PHP extensions are missing
- The first step in downloading Magento 2 and installing it is Readiness Test, where you will find an error missing three PHP extensions. The three absent extensions are xsl, soap, and intl. So, follow the instructions given to remove the errors.
- Open php.ini file from XAMPP i.e., Apache -> Config -> PHP (php.ini).For reference you can see the image below.
- Now, remove the semicolon (;) that is present in the front of the word “extension=intl”, “extension=soap” and “extension=xsl”.
- Save the file.
Dashboards infinite loop loading error.
In this error, your dashboard will go under the infinite loop, and it will take several minutes to load the panel, but it won't open.
As shown in the image below.
To fix this error, you need to go to the following PATH.
- (c;)>xampp>htdocs>magento2>app>etc.
- There you will find the “di” file. Open it.
- Here it would be best if you replace the word named "Symlink” with the word “Copy."
- Save it.
- Reopen the dashboard. You have fixed the error now.
Front end/ Luma theme is not visible/Logo Not Visible.
In this error, when you open your store, your Logo will not be visible, or the theme will not load properly.
As shown in the image below.
To fix this error, you need to go to the following PATH.
- (c;)>xampp>htdocs>magento2>app>etc.
- There you will find the “di” file. Open it.
- Here it would be best if you replace the word named "Symlink” with the word “Copy."
- Save it.
- Reopen the dashboard. You have fixed the error now.