magento2
magento2 copied to clipboard
Attribute set info is cached (EAV cache), but not cleaned after the attribute set updated in admin area
Preconditions and environment
- Magento version: 2.4.6-p5
- Anything else that would help a developer reproduce the bug
``
Steps to reproduce
- Use the product bulk api.
- Create product with required attributes from the attribute set.
- Add new attribute to the used attribute set and save
- Import the product again using the bulk api having the new attribute in the payload
- Attribute value is not saved on the product
Expected result
After a set is being updated and the eav cache is enabled, the related cache key of the set is being cleaned. Importing the same payload will have all attribute codes saved to the product that are present on the attribute set
Actual result
Product is missing attribute values that are recently added to the set without cleanen the cache manually
Additional information
See: \Magento\Eav\Model\ResourceModel\Entity\Attribute
protected function _afterSave(AbstractModel $object)
{
$this->_saveStoreLabels(
$object
)->_saveAdditionalAttributeData(
$object
)->saveInSetIncluding(
$object
)->_saveOption(
$object
);
$this->getConfig()->clear();
return parent::_afterSave($object);
}
Nothing is in place for the Set model: \Magento\Eav\Model\Entity\Attribute\Set
Set info is cached here: \Magento\Eav\Model\ResourceModel\Entity\Attribute\Set::getSetInfo
Release note
No response
Triage and priority
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [ ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [X] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @MaximGns. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance- upcoming 2.4.x release- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this - To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @MaximGns,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
Steps to reproduce
- Use the product bulk api.
- Create product with required attributes from the attribute set.
- Add new attribute to the used attribute set and save
- Import the product again using the bulk api having the new attribute in the payload
- Attribute value is not saved on the product
Product is missing attribute values that are recently added to the set.
Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12321 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@magento I am working on it