Pregunta

After upgrading to Magento 1.7 i get this error in custom catalog search and custom related products:

Fatal error: Call to a member function getBackend() on a non-object in \src\app\code\core\Mage\Eav\Model\Entity\Abstract.php on line 816

This error occurs when somethind has changed in an article (backend or import) and product flat tables are not reindexed. (Use of flat tables is activated). In the related article module i figured out that

$related_product_collection->addAttributeToFilter('store_destination', array('eq' => 0));

causes some problems. One difficulty to debug this is that i don't get an error stack trace, only the error itself.

Has somebody an idea why this error appears, and how to fix this? (and perhaps a hint to get the stack trace?)

¿Fue útil?

Solución

Usually happens when store_destination destination doesn't exist in your product collection sql.
check your sql like this:

echo $related_product_collection->getSelect()->__toString()
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top