2017-08-04 33 views
0

我看到類似的問題,並解決建議,但沒有運氣。下面下面是我的代碼跟蹤誤差,而我嘗試打開一個產品/從後端Magento中添加產品1.9未找到Magento源模型對於屬性em_bonus

源模型「opendealsettings /獎金」找不到屬性「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

似乎這個屬性是使用不再使用的擴展創建的。

嘗試從「管理 - 目錄 - 管理屬性」中刪除此屬性。如果它不起作用,你可以用這個內容創建一個magentos腳本的腳本:

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(); 
+0

謝謝@ sv3n第一個觸發 – Ananth

相關問題