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
Assign an attribute of the array type to a product and set a single value - for example we'll use ac/dc.
Try to find the product by Attribute Filter using this attribute and the value ac/dc.
Expected result: we find the product by the simple search criteria.
Reality: product not found
We see that attribute entity its stored as ["ac\/dc"] in the database due to the / needing to be escaped.
When we snoop around in atrocore\pim\app\SelectManagers\Product.php and the function convertAttributeWhere responsible for the search query, we see that the value it will look for is %"ac/dc"%
If we add a str_replace function and change the / to \\\\/ (4 dashes because of mysql like escape functionality) so that its now the [text_value][value] is %"ac\\/dc"% the product will be correctly returned. But I'm sure you can implement a better solution to the issue.
The text was updated successfully, but these errors were encountered:
Core: 1.8.10
PIM: 1.11.7
ac/dc
.We see that attribute entity its stored as
["ac\/dc"]
in the database due to the / needing to be escaped.When we snoop around in atrocore\pim\app\SelectManagers\Product.php and the function convertAttributeWhere responsible for the search query, we see that the value it will look for is
%"ac/dc"%
If we add a str_replace function and change the / to
\\\\/
(4 dashes because of mysql like escape functionality) so that its now the [text_value][value] is%"ac\\/dc"%
the product will be correctly returned. But I'm sure you can implement a better solution to the issue.The text was updated successfully, but these errors were encountered: