I keep running into this error in my Magento backend.

I changed some categories and soon after that I ran into this error:

Fatal error: Call to a member function getId() on a non-object in /home/test1039/domains/sambalshop.portalserver.nl/public_html/lib/Varien/Data/Tree/Dbp.php on line 331

I only see the error on the categories page. The rest of my Magento environment works fine.

  • please enable magento log and check the log file ar var/log folder
    – Amit Bera
    Jun 26, 2015 at 8:12

1 Answer 1


Log into admin which will still be working and under System, select Manage Shops and click on your shop name.

Your root category will be empty, simply select the correct root category.

  • Nice thinking, the root category is empty indeed. Although when I click the dropdown box, there aren't any categories there to select. Jun 26, 2015 at 8:29
  • Sounds like you accidently deleted your categories or the category database is broken. Do you see any categories in the frontend? Jun 26, 2015 at 8:58
  • I think the category database might be the problem. I don't see any categories on the frontend and the category tables are empty. Jun 26, 2015 at 9:14

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.