-
-
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
Fixed cannot save Category/Custom Design on store level #4032
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_text
produce by query of_getLoadAttributesSelect
functiontargetStoreValueIJustSave
Then 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 (*)