-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception on add reserved catalog product attribute #2875
Exception on add reserved catalog product attribute #2875
Conversation
I confirm this issue. When I create a new attribute reserved by the system, after pressing the [Save] button, the page loads empty. The following error is written in the exception.log file 2023-01-01T12:33:17+00:00 ERR (3):
Mage_Core_Exception: Invalid entity_type specified: in /var/www/html/app/Mage.php:660
Stack trace:
#0 /var/www/html/app/code/core/Mage/Eav/Model/Config.php(327): Mage::throwException('Invalid entity_...')
#1 /var/www/html/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(388): Mage_Eav_Model_Config->getEntityType(NULL)
#2 /var/www/html/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php(154): Mage_Eav_Model_Entity_Attribute_Abstract->getEntityType()
#3 /var/www/html/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php(38): Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract->_prepareForm()
#4 /var/www/html/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(138): Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Main->_prepareForm()
#5 /var/www/html/app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php(190): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#6 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(931): Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract->_beforeToHtml()
#7 /var/www/html/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php(44): Mage_Core_Block_Abstract->toHtml()
#8 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(931): Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tabs->_beforeToHtml()
#9 /var/www/html/app/code/core/Mage/Core/Block/Text/List.php(42): Mage_Core_Block_Abstract->toHtml()
#10 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(932): Mage_Core_Block_Text_List->_toHtml()
#11 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(650): Mage_Core_Block_Abstract->toHtml()
#12 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(594): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#13 /var/www/html/app/design/adminhtml/default/default/template/page.phtml(53): Mage_Core_Block_Abstract->getChildHtml('left')
#14 /var/www/html/app/code/core/Mage/Core/Block/Template.php(257): include('/var/www/html/a...')
#15 /var/www/html/app/code/core/Mage/Core/Block/Template.php(291): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#16 /var/www/html/app/code/core/Mage/Core/Block/Template.php(304): Mage_Core_Block_Template->renderView()
#17 /var/www/html/app/code/core/Mage/Adminhtml/Block/Template.php(74): Mage_Core_Block_Template->_toHtml()
#18 /var/www/html/app/code/core/Mage/Core/Block/Abstract.php(932): Mage_Adminhtml_Block_Template->_toHtml()
#19 /var/www/html/app/code/core/Mage/Core/Model/Layout.php(580): Mage_Core_Block_Abstract->toHtml()
#20 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(397): Mage_Core_Model_Layout->getOutput()
#21 /var/www/html/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php(141): Mage_Core_Controller_Varien_Action->renderLayout()
#22 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(428): Mage_Adminhtml_Catalog_Product_AttributeController->editAction()
#23 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(262): Mage_Core_Controller_Varien_Action->dispatch('edit')
#24 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(188): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#25 /var/www/html/app/code/core/Mage/Core/Model/App.php(371): Mage_Core_Controller_Varien_Front->dispatch()
#26 /var/www/html/app/Mage.php(745): Mage_Core_Model_App->run(Array)
#27 /var/www/html/index.php(71): Mage::run('', 'store')
#28 {main} Applying the change from this PR the page loads and displays the error message |
why is the diff on README so big? can we just add your single entry instead? |
READMY generated automatically (with all-contributors-cli Version: 6.24.0). |
all-contributors-cli tool started addeing tbody to the table in a recent version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OT: is there an option to not set ?style=flat-square
?
Looking at your fork it seems the contributors badge is not rendering properly. |
We can only add 'badgeTemplate' and 'contributorTemplate' to .all-contributorsrc Documentation Related PR |
@elidrissidev Thanks, |
* Fixed exception on add reserved catalog product attribute * Add @AGelzer as a contributor * Changed all contributors badge template to html
Description (*)
This Pull Request fix the white page/exception on add reserved catalog product attributes.
Exception:
Call to a member function getEntityTypeCode on null in app/code/core/Mage/Eav/Block/Adminhtml/Attribute/Edit/Main/Abstract.php:154
Fix: add entity_type to $data before Exception occurs.
Manual testing scenarios (*)
Questions or comments
Reserved catalog product attributes codes
*Attribute 'position' + Mage_Catalog_Model_Product Class get Methods
see \Mage_Catalog_Model_Product::getReservedAttributes
Contribution checklist (*)