I just performed a clean installation of Magento ver. 2.2.6 on Debian 9.6.
I can access the admin area just fine, but when I visit the website I get an error saying:
An error has happened during application run. See excepton log for details. Could not write error message to log. Please use developer mode to see the message.
So I checked var/log/exception.log and these messages appear:
[2018-11-13 18:20:55] main.CRITICAL: Circular dependency: Magento\Catalog\Model\Indexer\Product\Price\Plugin\TableResolver depends on Magento\Catalog\Model\Indexer\Product\Price\Plugin\TableResolver and vice versa. {"exception":"[object] (LogicException(code: 0): Circular dependency: Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Plugin\\TableResolver depends on Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Plugin\\TableResolver and vice versa. at /var/www/html/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:55)"} [] [2018-11-13 18:21:17] main.CRITICAL: Circular dependency: Magento\Catalog\Model\Indexer\Product\Price\Plugin\TableResolver depends on Magento\Catalog\Model\Indexer\Product\Price\Plugin\TableResolver and vice versa. {"exception":"[object] (LogicException(code: 0): Circular dependency: Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Plugin\\TableResolver depends on Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Plugin\\TableResolver and vice versa. at /var/www/html/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:55)"} [] [2018-11-13 18:21:26] main.CRITICAL: Circular dependency: Magento\Catalog\Model\Indexer\Product\Price\Plugin\TableResolver depends on Magento\Catalog\Model\Indexer\Product\Price\Plugin\TableResolver and vice versa. {"exception":"[object] (LogicException(code: 0): Circular dependency: Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Plugin\\TableResolver depends on Magento\\Catalog\\Model\\Indexer\\Product\\Price\\Plugin\\TableResolver and vice versa. at /var/www/html/magento/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:55)"} []
This is the first time I install magento so I'm not experienced with it. Any help would be appreciated.
Thanks
I understand the problem you are facing !
Do one thing, Open your SSH command line console , go to the root directory of magento 2 and run below commands in sequence :
rm -rf generated rm -rf var/cache php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush
Hope it helps !
Hi, thank for your reply.
The script runs successfully, but then magento is not accessible. Neither the admin area, or the customer view. I know apache is running because the default page is accessible, but magento is not.
Compilation was started. Interception cache generation... 7/7 [============================] 100% 45 secs 286.0 MiB Generated code and dependency injection configuration successfully. Deploy using quick strategy frontend/Magento/blank/en_US 2126/2126 ============================ 100% % 19 secs adminhtml/Magento/backend/en_US 2101/2101 ============================ 100% % 7 secs frontend/Magento/luma/en_US 2142/2142 ============================ 100% % 10 secs Execution time: 63.12451004982 Cleaned cache types: config layout block_html collections reflection db_ddl eav customer_notification config_integration config_integration_api full_page config_webservice translate Flushed cache types: config layout block_html collections reflection db_ddl eav customer_notification config_integration config_integration_api full_page config_webservice translate
Browser error:
This page isn’t working my_domain.com is currently unable to handle this request. HTTP ERROR 500
For now I reverted to a previous snapshot, so the admin area is good again, but the customer view is not.
any help on this?
Had the same issue, tried the suggested solution and got the same 500 error. Solved it by giving permissions to the generated files (was root)
It was a permission issue as you pointed out. No need to delete any files. Just change permission and restart Apache. We are all set. Thanks for your pointer.
$:/var/www/html# chown -R www-data:www-data *
$:/var/www/html#
$:/var/www/html#
$:/var/www/html# sudo service apache2 restart
$:/var/www/html#