Skip to content

Attribute set info is cached (EAV cache), but not cleaned after the attribute set updated in admin area #38827

Open
@MaximGns

Description

@MaximGns

Preconditions and environment

  • Magento version: 2.4.6-p5
  • Anything else that would help a developer reproduce the bug

``

Steps to reproduce

  1. Use the product bulk api.
  2. Create product with required attributes from the attribute set.
  3. Add new attribute to the used attribute set and save
  4. Import the product again using the bulk api having the new attribute in the payload
  5. 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.
  • 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”.

Metadata

Metadata

Assignees

Labels

Area: APIsComponent: WebapiAsyncIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.6-p5Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions