causes the issue when custom entity is not assigned to a product in case when the same custom entity is linked with different products (shown on the same page) by different product attributes, e.g.:
Product SKU=001 linked to the custom entity by custom_attr_001
Product SKU=002 linked to the custom entity by custom_attr_002
Both products are shown on the same page (e.g. category page)
Actual Result:
Product SKU=001 has no the custom entity assigned
Product SKU=002 has the custom entity assigned by custom_attr_002
Expected Results:
Product SKU=001 has the custom entity assigned by custom_attr_001
Product SKU=002 has the custom entity assigned by custom_attr_002
The following code (especially line 66) https://github.com/Smile-SA/magento2-module-custom-entity-product-link/blob/3adc1be0d40c8b0440b1edc2745eef719a0cc4e3/Observer/Catalog/Product/AddCustomEntitiesInformation.php#L65-L69
causes the issue when custom entity is not assigned to a product in case when the same custom entity is linked with different products (shown on the same page) by different product attributes, e.g.:
custom_attr_001
custom_attr_002
Actual Result:
custom_attr_002
Expected Results:
custom_attr_001
custom_attr_002
cloning workaround