[Issue] Only load attributes from attribute set of given entity type #39815
Labels
Issue: ready for confirmation
Reported on 2.4.x
Indicates original Magento version for the Issue report.
This issue is automatically created based on existing pull request: #39794: Only load attributes from attribute set of given entity type
Description
The
eav_entity_attribute
table can contain attributes of different entity types (from third parties), next to thecatalog_product
entity type attributes. These attributes can possibly have the same attribute set IDs as thecatalog_product
entity attribute set IDs.This can cause issues when loading the attributes by attribute set for a product.
For example: when switching a product's attribute set to a different attribute set, the following snippet will try to delete the data of the product of the old attribute set:
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Catalog/Model/ResourceModel/Product.php#L344-L355
This will result in the following error:
On: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Catalog/Model/ResourceModel/Product.php#L373:
Manual testing scenarios
blog_post
andblog_category
entity types), and make sure you have a product attribute set ID with the same attribute set ID of the custom entity type.Call to a member function getBackendTable() on bool
Contribution checklist
The text was updated successfully, but these errors were encountered: