- MANADEV is the best, excellent support (5-Star)

Aug 22, 2012 Absolutex

Certified Magento Enterprise developer Certified Magento developer Certified Magento theme developer Certified Magento specialist

Manadev is certified extension and theme
developer for Magento

Error - The Attribute Model Is Not Defined

Question:

Getting following errors on quick search or category pages:

  • The attribute model is not defined

    or

  • Call to a member function init() on a non-object in /home/*****/public_html/app/code/local/Mana/Filters/Block/View.php on line 86/87

Answer:

Underlying reason of the issue might happen, if attribute is deleted directly in DB, not in Magento admin panel. There is additional code which handles attribute deletions which is called on admin panels "Delete attribute" action and it is not called when deleted in DB.

To detect it, run the following query in phpMyAdmin:

SELECT *
FROM m_filter2_store
WHERE NOT EXISTS (SELECT * FROM m_filter2 WHERE m_filter2.id = m_filter2_store.global_id)

To fix it, run the following query in phpMyAdmin:

DELETE 
FROM m_filter2_store
WHERE NOT EXISTS (SELECT * FROM m_filter2 WHERE m_filter2.id = m_filter2_store.global_id)

We Accept: PayPal Visa MasterCard American Express Discover