Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Professional - Invalid backend model specified
 
shane_eller
Jr. Member
 
Total Posts:  4
Joined:  2009-07-16
Indianapolis, Indiana
 

I have a magento professional 1.9.1.0 site that gives me the error “Invalid backend model specified: enterprise_targetrule/catalog_product_attribute_backend_rule” when I try to add products.

I have a copy of the site running locally that does not give me this error with I add products. Any idea where I should look or what could have gone wrong?

 
Magento Community Magento Community
Magento Community
Magento Community
 
vidhyadeepa
Jr. Member
 
Total Posts:  1
Joined:  2011-06-20
 

Well, I get the same error too when I try to add a new Product or edit a product. I was able to add the products before and all of a sudden I get the following error : Invalid backend model specified: enterprise_targetrule/catalog_product_attribute_backend_rule.

Any help would be appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iojones
Jr. Member
 
Total Posts:  1
Joined:  2009-11-05
 

Here is how I fixed it:

DELETE FROM eav_attribute WHERE backend_model 'enterprise_targetrule/catalog_product_attribute_backend_rule';

I don’t recommend this solution since it is merely a bandaid fix, but since I was working locally it didn’t have any negative affect.

 
Magento Community Magento Community
Magento Community
Magento Community
 
diffstrat
Jr. Member
 
Total Posts:  4
Joined:  2010-07-09
 

It seems that Magento hasn’t accommodated for loading Enterprise backend_models yet. It assumes all class names should be prefixed with ‘mage_’ so I made the following change.

Enterprise version 1.12
File: app/code/core/Mage/Core/Model/Config.php
Class: Mage_Core_Model_Config
Function:  getGroupedClassName()
Example Backend Model: enterprise_targetrule/catalog_product_attribute_backend_rule
Lines: 1253-1255

// Original Code
if (empty($className)) {
    $className 
'mage_'.$group.'_'.$groupType;
}

// Modified Code to accommodate for enterprise_ backend models
if (empty($className)) {
    
if (preg_match('/^enterprise_/'$classId)) {
        $className 
$group.'_'.$groupType;
    
else {
        $className 
'mage_'.$group.'_'.$groupType;
    
}
}

Note: I was forced to override this method via copying the file and placing it in app/code/local/Mage/Core/Model/Config.php because it seems the class is loaded directly and can’t be extended via a module.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top