I am new to magento2. Have worked enough on magento 1 but this is my first project with magento 2.2 and i ran into issue.

I have magento 2.2 setup and installed template monster theme. Everything was working fine. Then i started adding content of my own and created few categories. Later i realize i didn't want 1 root category which i created. so i deleted it and then i started getting this error on front side. Back-end is working perfect.

Here is a full list of errors i am getting.


I already tried disabling theme and extensions. None of them work. Basically magento is looking for category id 0 which is not there as it always start with 1 in db. I am not sure how to solve or dont know where to see.

Any guidance will be helpful.

2 Answers 2


I check all database table for wrong entry somewhere and found that in store group table default root category was set to 0. I am not sure how it happened but i think when i deleted one of the root category from the backend, it must changed in store group table or something else. i change it to 1 and it solved the issue. So posting here answer.



Try deleting the following folder.

generated , pub/static

then run the deploy command

php bin/magento setup:static-content:deploy

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.