You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce this issue :
1- You need to have at least one custom entity defined in your administration
2- In Catalog attribute configuration, after selecting your catalog product attribute, in "Storefront Properties", you must select "Comparable on Storefront" to Yes.
3- In your frontend, add a product to the compare list with custom entity defined previously in the admin
4- Display the compare list
You must have an error :
Exception #0 (Exception): Notice: Array to string conversion in /home/amadeco/public_html/Future/vendor/magento/module-catalog/Block/Product/Compare/ListCompare.php on line 209
This error is produced by
getProductAttributeValue function
in magento/module-catalog/Block/Product/Compare/ListCompare.php
The custom entity value return an array, a string is expected.
Not sure if we need to define a plugin to correct this issue with a conditional approach. $attribute->getFrontendInput() == 'smile_custom_entity'
or if we have a proper solution to handle this case.
Ilan Parmentier
The text was updated successfully, but these errors were encountered:
Good afternoon,
To reproduce this issue :
1- You need to have at least one custom entity defined in your administration
2- In Catalog attribute configuration, after selecting your catalog product attribute, in "Storefront Properties", you must select "Comparable on Storefront" to Yes.
3- In your frontend, add a product to the compare list with custom entity defined previously in the admin
4- Display the compare list
You must have an error :
This error is produced by
getProductAttributeValue function
in magento/module-catalog/Block/Product/Compare/ListCompare.php
The custom entity value return an array, a string is expected.
Not sure if we need to define a plugin to correct this issue with a conditional approach.
$attribute->getFrontendInput() == 'smile_custom_entity'
or if we have a proper solution to handle this case.
Ilan Parmentier
The text was updated successfully, but these errors were encountered: