Important. We are closed. Due to decreased amount of time available, we don't accept new orders and we don't provide support for existing ones.

Your support is so fast it’s stunning. You guys obviously know your stuff, including the knowledge of your clients who make mistakes during installati ... Read more

Apr 21, 2017 Haleen Hoes

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