Link to home
Start Free TrialLog in
Avatar of Boon Chye Phang
Boon Chye Phang

asked on

Magento getIsInStock error

Magento CE 1.9.3.3 having server 500 error on some product pages. The error message is:
Call to a member function getIsInStock() on null

Open in new window

User generated image
Why it happened and how do I fix it?
Avatar of David Favor
David Favor
Flag of United States of America image

Looks like ->getIsInStock() was called on a NULL object.

You'll just have to dig into your version of Magento + figure out how to fix this.

Likely, you had some SQL sequence of statements run outside a transaction, which was aborted... so you have partial data in your database which causes Magento to think there's an object to work on + then when the object instantiation occurs... the object can't really be created completely.

If you turn on debugging in Magento, then check your logs, likely you'll find clues about how to fix this.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.