1

I'm trying to rewrite a class, although it gives an error in Mage_Eav_Model_Entity_Attribute_Abstract telling me the class Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default does not exist in Mage_Core_Model_Config:1349

Cache has been cleaned.

I'm rewriting class Mage_Eav_Model_Entity_Attribute_Frontend_Default as followes:

<global>
    <models>
        <eav>
           <rewrite>
               <entity_attribute_frontend_default>
                 Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default
               </entity_attribute_frontend_default>
            </rewrite>
        </eav>
    </models>
</global>

And add the file in app/code/local/Namespace/FormValidator/Model/Eav/Entity/Attribute/Frontend/Default.php

class Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default extends Mage_Eav_Model_Entity_Attribute_Frontend_Default 
{

}
  • check your log file – Asish Hira May 11 '16 at 10:04
1

You did not define your own model in config.xml, Magento does not know about the model of your extension. Add this to your config.xml:

<global>
    <models>

        <namespace_formvalidator>
            <class>Namespace_FormValidator_Model</class>
        </namespace_formvalidator>

        <eav>
           <rewrite>
               <entity_attribute_frontend_default>
                 Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default
               </entity_attribute_frontend_default>
            </rewrite>
        </eav>
    </models>
</global>
  • It was defined, I just copied a small part of the config. – Paul May 11 '16 at 11:32
  • Ah, good you found it. Whitespace issues are lovely :) – Anna Völkl May 11 '16 at 12:05
0

Found the issue, the rewrite should be on one line, so:

<entity_attribute_frontend_default>Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default</entity_attribute_frontend_default>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.