Fixed cannot save Category/Custom Design on store level#4032
Fixed cannot save Category/Custom Design on store level#4032forfin wants to merge 1 commit intoOpenMage:mainfrom
Conversation
|
I'm not sure how to replicate this bug. My steps:
With the steps above, the saving and rendering of category attribute works as expected in a multi-store setting. Please provide your detail steps to show the bug. Including how your custom attributes are added and rendered in backend. |
|
Custom attribute create by this script $installer = new Mage_Eav_Model_Entity_Setup('core_setup');
$installer->startSetup();
$installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'bestseller_top_section', [
'group' => 'Custom Design',
'label' => 'Best Seller & Top Section',
'input' => 'textarea',
'type' => 'text',
'default' => '',
'required' => 0,
'visible_on_front' => 1,
'filterable' => 0,
'searchable' => 0,
'comparable' => 0,
'user_defined' => 0,
'is_configurable' => 1,
'is_visible' => 1,
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'note' => '',
]);
$installer->endSetup();To reproduce issue You can go to db and change |
|
Perhaps it's #2964? |
|
Here video how to reproduce: https://streamable.com/lej637
|
|
Hey, I just have a time to look it more closely. It seems it happen only v19 So I could just add patch manually to my v19 variant. |



Description (*)
When I debug why some data I just save didn't show on Catalog -> Manage Categories -> (Choose non-default Store View) -> Custom Design -> (Some custom EAV attrs)
I found that the text actually save on db. But when it query back, it query for both default store (store_id is 0) and target store and later cause issue.
Magento logic seems to rely on order of values query from db, like first match item will be a value for default store while second item will be a value for target store.
Here is example table
catalog_category_entity_textproduce by query of_getLoadAttributesSelectfunctiontargetStoreValueIJustSaveThen on Magento admin page, It just show nothing on field I just save.
This PR will make sure if value_id mixed up, Magento still can show a correct value for the store.
Related Pull Requests
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)