-
Notifications
You must be signed in to change notification settings - Fork 114
illegal_argument_exception when importing multiselect attribute #87
Comments
The current mapping expects the color to be configurable attribute. so product would be :
in your case it seems colors are simple text fields. In that case, adjusting |
That makes sense, we will refactor our color attribute probably then. Issue unfortunately occurs also when I use another attribute, for example I tried "material_filter". There I get Thanks! |
no, mapping is to define what you want to enforce. We have multiple custom attributes which ES doesn't complain about. the thing is: once you add data type of |
🤔 good question. What I normally do for multi select is I return them as a JSON string SET e.g: |
So mabye all multiselect attribute values should be treated as text, also when only one option was selected. E.g. |
@haelbichalex please check how “color_options” are defined. I belive that you should always warp the single values with just an array “[value]” to be 1000% on the safe side. Please make sure you ran “yarn db rebuild” in order to apply the shenanigans changes |
@pkarw I don't think this has anything to do with color as it appears on a different attribute as well.
Also running
|
it's working for now by also parsing the value to an integer in product.js:
This is a workaround though which should probably be handled somewhere and somehow else... I'm just not that into VS yet to do it myself, maybe someone can provide me a starting point 👍 |
I have a Magento 2 store connected to the vue-storefront-api.
I created two products and created a multiselect attribute for testing purposes.
On one product I selected one option for the attribute and on the other one I selected multiple options.
Then I get this error when running
yarn mage2vs import
:When selection only one attribute option on both products or selecting multiple options on both, the error is not appearing.
Any hints would be appreciated! 👍
The text was updated successfully, but these errors were encountered: