Error 500 on product detail page in Magento2

by Parthavi   Last Updated April 15, 2019 11:09 AM

When I am trying to open product detail page I am getting error Http Error 500. Also, no log is generated to fetch any error.

Everything else works fine except the product detail page.I did cache:clean , cache:flush, indexer:reindex -> then Deleted Browser Cache.

Answers 1

Enable error reporting in magento and check exact error

In app/bootstrap.php

  ini_set('display_errors', 1);

uncomment ini_set ( remove # ) #ini_set('display_errors', 1); to ini_set('display_errors', 1)

Or add this to index.php file.

ini_set('display_errors', 1);

And also enable developer mode. First check current mode. run this cmd

   php bin/magento deploy:mode:show

it will so the current mode

if current mode is not developer than change mode to developer by this command

 php bin/magento deploy:mode:set developer

change permissions var/ pub/ generated/ forlder

 sudo chmod -R 777 var/ pub/ genereted/
Surendra Kumar Ahir
Surendra Kumar Ahir
April 15, 2019 11:02 AM

Related Questions

HTTP 500 error with a php script

Updated March 14, 2019 10:09 AM

Magento 2 Check if url returns 404

Updated October 29, 2018 12:09 PM