6

System: Magento 2.1

Everything was running fine 5 minuts ago. I had 3 Products in my Catalog (all using the same Attribute Set). Then I simply deleted 2 Attributes from my (currently in use) Attribute Set via Admin Panel. Then via Magento CLI I did cache:clean , cache:flush, indexer:reindex -> then Deleted Browser Cache.

In Browser I reloaded my webshop (everithyng looks fine). When I click on a Product -> Product Page https://myshop.de/product1-300x200.html loads and gives HTTP ERROR 500.

Everything else on my Webshop works fine, just all my Product Pages give me the same HTTP ERROR 500 error.

  • Did you check the error logs? – Khoa TruongDinh Dec 28 '16 at 12:55
  • updatedmy question with error log content – shahir hajir Dec 28 '16 at 13:14
  • Is there the exception log? – Khoa TruongDinh Dec 28 '16 at 13:20
  • Yes, but exception.log was last updated on 22.December2016. My Problem has occured today, yesterday everything was perfekctly working. It occured when I deleted 2 Attributes from my active Attribute Set – shahir hajir Dec 28 '16 at 13:28
  • 1
    You are the best My Friend ! after enabling error reporting I know the issue. It came from a customAttr1.phtml where I tried to access my custom attribute, which does not exist, because I deleted it. Just need to delete/edit some files – shahir hajir Dec 28 '16 at 13:36
8

For the unexpected error (e.g 500), we should enable error reporting on the bootstrap:

app/bootstrap.php

ini_set('display_errors', -1) // Should enable error reporting with -1 value.

In your case, we need to check the places where you call your custom attributes which have been deleted.

Another way, we need to check the Apache error log.

  • Thanks mate.. I was checking logs for last one hour.. Now I got the issue.. – Mohit Kumar Arora Aug 17 '17 at 11:16
1

Mostly "HTTP ERROR 500" occur due to code error or wrong file/directory permission. First you need to check/set proper permission and then enable error reporting to find actual error, after that you need to fix code/bug.

To enable error reporting

add following code at top after php tag <?php in index.php or app/bootstrap.php file

error_reporting(E_ALL); 
ini_set("display_errors", 1);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.