The developers make every effort to ensure their Magento extensions are stable, reliable, and well-tested. However, due to the highly-customizable nature of Magento they cannot anticipate every possible configuration and so incompatibilities may arise. This guide gives an overview of the most common issues are found on client’s sites and how to resolve them.
The purpose of this document is to help the magento2 users in solving the commonly faced issues while installation and usage of Magento 2.x Extensions.
The purpose of this document is to help the magento2 users in solving the commonly faced issues while installation and usage of Magento 2.x Extensions.
The most common methods of troubleshooting are as follows:
Log into Magento Store Admin Panel
Navigate to System ⇒ Cache Management. Now select all the cache types in the list, choosing the refresh option in the drop down menu , and finally clicking submit.
You can also try Reindexing the Magento, if you are having problem with your newly Installed Extension. It can be done by running this command in CLI:
Easiest way but not secure: Just give the 777 permission to your Extension folders and try uploading again.
Linux Permissions: Your apache user:group in linux and the folder permissions of your magento should match. e.g if your cPanel/ftp username/ssh user is “mjoy”. You need to check which group this user belongs to. Suppose “mjoy” user belongs to group “company”. In this case add “www-data” or “apache” group to “company” group as well. This is a bit complex to solve and require good knowledge of linux permission system.
Access FTP into your remote website directory where your Magento files reside.
Find & delete the file named maintenance.flag.
Your site should now work normally.
Check list of extension installed in your store you can do that by following command in your terminal
In order to resolve it you have to run few commands that will give proper permission commands are as :
How to debug:
Open setup/src/Magento/Setup/Model/FilePermissions.php
Goto line 143 in method checkRecursiveDirectories
Add the lines var_dump($subDirectory); var_dump($subDirectory->isWritable());
Re-run:
The purpose of this document is to help the magento2 users in solving the commonly faced issues while installation and usage of Magento 2.x Extensions.
The purpose of this document is to help the magento2 users in solving the commonly faced issues while installation and usage of Magento 2.x Extensions.
The most common methods of troubleshooting are as follows:
- Refreshing the Cache.
- Reindexing the Magento
- Solving 404 error on System Configuration
- Permission issues on new extension
- Disable Maintenance Mode if your Extension is not installed successfully
- Disable the newly installed Extension if your Magento store stops working or throws fatal error
- View list of extensions and Disable/Enable installed extensions
- Fixing Permission error after running php bin magento/bin setup:upgrade command
- Setting Deploy mode: Developer to see exact errors
- Solving error while deploying sample data
- Fixing errors while static-content deploy
REFRESHING THE CACHE
After installing the extension on Magento, if the installed Extension is not visible or is not working properly then you can try Refreshing the Cache from Magento Admin. You can do it via ssh/terminal (CLI) or can do it from admin panel.1. VIA SSH/TERMINAL CLI
Run this command into CLI:php bin/magento cache:cleanIf it doesn’t solves the problem, run:
php bin/magento cache:flush
2. VIA ADMIN PANEL
To refresh the cache from admin panel, follow these steps:Log into Magento Store Admin Panel
Navigate to System ⇒ Cache Management. Now select all the cache types in the list, choosing the refresh option in the drop down menu , and finally clicking submit.
REINDEXING THE MAGENTO
You can also try Reindexing the Magento, if you are having problem with your newly Installed Extension. It can be done by running this command in CLI:
php bin/magento indexer:reindexMake sure that all indexers are reindexed and the output of the command looks like:
Category Products index has been rebuilt successfully in <time>Source: Magento DevDocs
Product Categories index has been rebuilt successfully in <time>
Product Price index has been rebuilt successfully in <time>
Product EAV index has been rebuilt successfully in <time>
Stock index has been rebuilt successfully in <time>
Catalog Rule Product index has been rebuilt successfully in <time>
Catalog Product Rule index has been rebuilt successfully in <time>
Catalog Search index has been rebuilt successfully in <time>
SOLVING 404 ERROR ON SYSTEM CONFIGURATION
After installing your Extension, if you got 404 error on “System -> Configuration”, then it may be the problem of Magento Session/Registry, you can solve this issue just by Logging Out of Magento admin and Logging In again.PERMISSION ISSUES EXTENSION
Sometimes the installation will fail because Magento doesn’t have sufficient permissions to write to the necessary web server directories. There are multiple ways to fix this.Easiest way but not secure: Just give the 777 permission to your Extension folders and try uploading again.
Linux Permissions: Your apache user:group in linux and the folder permissions of your magento should match. e.g if your cPanel/ftp username/ssh user is “mjoy”. You need to check which group this user belongs to. Suppose “mjoy” user belongs to group “company”. In this case add “www-data” or “apache” group to “company” group as well. This is a bit complex to solve and require good knowledge of linux permission system.
DISABLE MAINTENANCE MODE IF YOUR EXTENSION IS NOT INSTALLED SUCCESSFULLY
The solution of this problem is simple:
Access FTP into your remote website directory where your Magento files reside.
Find & delete the file named maintenance.flag.
Your site should now work normally.
DISABLE THE NEWLY INSTALLED EXTENSION IF YOUR MAGENTO STORE STOPS WORKING OR THROWS FATAL ERROR
If you are getting any fatal error and getting any exception after you have installed new extension. Just disable the new extension. You can do that by running a command from terminal:sudo php bin/magento module:disable YourExtentionNameAfter doing this clear the cache and try to load your store again.
VIEW LIST OF EXTENSIONS AND DISABLE/ENABLE INSTALLED EXTENSIONS
Some time after installing extension our extension does not appear in our store so to solve this issue we have to check few things that is given below:Check list of extension installed in your store you can do that by following command in your terminal
sudo php bin/magento module:statusYou will get list of all extension check your extension is there or not if not then you have to type another command to enable you extension
sudo php bin/magento module:enable YourExtentionNameAfter doing this you will get to see your extension on your store.
FIXING PERMISSION ERROR AFTER RUNNING PHP BIN MAGENTO/BIN SETUP:UPGRADE COMMAND
Once you have run upgrade command then if you will not give permission then you will get error like below:In order to resolve it you have to run few commands that will give proper permission commands are as :
sudo chmod -R 777 var/Your permission issue will be resolved.
sudo chmod -R 777 pub/
sudo chmod -R 777 app/
SETTING DEPLOY MODE: DEVELOPER TO SEE EXACT ERRORS
Magento comes with 3 different modes out of the box (developer, default and production). In order to check exact error you have to switch to developer mode for that write following command
sudo php bin/magento deploy:mode:set developerNow it will be set to developer mode and you can check the exact error.
SOLVING ERROR WHILE DEPLOYING SAMPLE DATA
Some time when we are deploying sample data we get error in that case we can resolve the issue by the following command
composer config repositories.0 composer https://repo.magento.comYour issue will be resolved.
FIXING ERRORS WHILE STATIC-CONTENT DEPLOY
We get error like this checkInstallationFilePermissions when we do static-content-deploy.
How to debug:
Open setup/src/Magento/Setup/Model/FilePermissions.php
Goto line 143 in method checkRecursiveDirectories
Add the lines var_dump($subDirectory); var_dump($subDirectory->isWritable());
Re-run:
php bin/magento setup:upgradeNow you’ll see what is really wrong, and you can fix it.
Comments
Post a Comment