The products are shown in category view. But, once clicked, the product page is not shown, but instead, a 404 Whoops, our bad… message is displayed.

I tried clearing the cache and was not able not find the re-index option that is mentioned in other questions.

The system.log and exception.log shows nothing when the error occurs.

Any idea why is it broken and how to fix it?

  • 1 up for question because you do latest. Apr 12, 2016 at 9:13

2 Answers 2


Try re-indexing using the Magento 2 CLI

ssh into the server where your Magento files are and go into your Magento root folder.

cd /var/www/html/magento2

From that folder you can access the magento 2 cli with


If you can't start it, use chmod +x bin/magento

in order to re-index data via the CLI, use the following command

bin/magento indexer:reindex

If you want to be sure that NO cache is kept, you can remove the following folders from the var directory with:

rm -rf var/cache var/generation var/pagecache var/di

and then re-compile magento using command

bin/magento setup:di:compile

I hope this will help you.

  • Thanks @denish it did re-index. But the re-index did not solve the 404 problem.
    – Michael
    Apr 12, 2016 at 7:37
  • clear all cache and re compile. it may help. Apr 12, 2016 at 7:39
  • nope. I tried compiling by sudo bin/magento setup:static-content:deploy which still left me with 404. It only broke my theme :)
    – Michael
    Apr 12, 2016 at 7:54
  • this command only generates static files it not compiled. try with php -f bin/magento setup:di:compile Apr 12, 2016 at 7:58
  • now I get 500 and the nginx log shows: Uncaught TypeError: Argument 1 passed to Magento\Framework\Config\Scope::__construct() must be an instance of Magento\Framework\App\AreaList, instance of Magento\Framework\ObjectManager\ObjectManager given,
    – Michael
    Apr 12, 2016 at 8:12

Please check all product entity(Ids) available in "sequence_product" table. Need product id in that table to init product page.

  • This was the exact problem when we migrated from M1 -> M2. Thanks for the help :)
    – Arvind07
    Jan 31, 2020 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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