I see similar issues and work around suggestions but no luck. Following below is my code trace error while I try to open a product/add product from backend in Magento 1.9
Source model "opendealsettings/bonus" not found for attribute "em_bonus"
Trace:
#0 C:\xampp\htdocs\app\code\core\Mage\Eav\Model\Entity\Attribute\Abstract.php(388): Mage::exception('Mage_Eav', 'Source model "o...')
#1 C:\xampp\htdocs\app\code\core\Mage\Adminhtml\Block\Widget\Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#2 C:\xampp\htdocs\app\code\core\Mage\Adminhtml\Block\Catalog\Product\Edit\Tab\Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#3 C:\xampp\htdocs\app\code\core\Mage\Adminhtml\Block\Widget\Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#4 C:\xampp\htdocs\app\code\core\Mage\Core\Block\Abstract.php(922): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#5 C:\xampp\htdocs\app\code\core\Mage\Adminhtml\Block\Catalog\Product\Edit\Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#6 C:\xampp\htdocs\app\code\core\Mage\Core\Block\Abstract.php(297): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#7 C:\xampp\htdocs\app\code\core\Mage\Core\Model\Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 C:\xampp\htdocs\app\code\core\Mage\Core\Model\Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#9 C:\xampp\htdocs\app\code\core\Mage\Core\Model\Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#10 C:\xampp\htdocs\app\code\core\Mage\Core\Model\Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 C:\xampp\htdocs\app\code\core\Mage\Core\Model\Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 C:\xampp\htdocs\app\code\core\Mage\Core\Controller\Varien\Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 C:\xampp\htdocs\app\code\core\Mage\Core\Controller\Varien\Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 C:\xampp\htdocs\app\code\core\Mage\Adminhtml\Controller\Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#15 C:\xampp\htdocs\app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php(249): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#16 C:\xampp\htdocs\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Adminhtml_Catalog_ProductController->editAction()
#17 C:\xampp\htdocs\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 C:\xampp\htdocs\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 C:\xampp\htdocs\app\code\core\Mage\Core\Model\App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#20 C:\xampp\htdocs\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#21 C:\xampp\htdocs\index.php(83): Mage::run('', 'store')
#22 {main}
答案 0 :(得分:0)
似乎这个属性是使用不再使用的扩展名创建的。
尝试从"管理员 - 目录 - 管理属性"中删除此属性。如果它不起作用,您可以使用以下内容在magentos root中创建脚本:
require 'app/Mage.php';
Mage::app('admin');
$setup = Mage::getModel('eav/entity_setup', 'core_setup');
$setup->startSetup();
$setup->removeAttribute('catalog_product', 'em_bonus');
$setup->endSetup();