Repository navigation
Only load attributes from attribute set of given entity type - #39794
Maikel-Koek wants to merge 2 commits into
Conversation
Only load attributes from attribute set of given entity type
|
Hi @Maikel-Koek. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
@magento run all tests |
|
@magento It looks like tests are failing that have nothing to do with my changes. |
|
The unit test failures do seem related to changes introduced in this PR:
So maybe the unit tests found a bug in this change, or they should be updated. I'll leave that up to you to figure out. |
|
@magento create issue |
|
Hello @Maikel-Koek, Just wanted to followup with you on the issue reproduction, please refer to this #39815 (comment). We are unable to reproduce the issue mentioned here. Please let us know if we missed anything, meanwhile we are moving this PR Thanks |
|
@Maikel-Koek I still see no entity-type filter in |
|
@lbajsarowicz I believe I created a workaround for this at the time, which is a while ago. You may investigate this further; I currently do not have the time for this. |
|
@Maikel-Koek thanks for handing it over. Continued in #41724, which keeps your commit. On |
Description
The
eav_entity_attributetable can contain attributes of different entity types (from third parties), next to thecatalog_productentity type attributes. These attributes can possibly have the same attribute set IDs as thecatalog_productentity 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_postandblog_categoryentity 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 boolContribution checklist
Resolved issues: