-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid option value when saving custom optons #4085
Comments
Hi @igrslv I created an internal ticket MAGETWO-51756 to make errors reporting more intuitive |
Hi @igrslv! I cannot reproduce this bug: neither on CE nor on EE fresh develop. After I save simple product product with 1 option and 2 values, add another 3rd row without filling in any data in it, remove this row & save the product, I get only 2 values in \Magento\Catalog\Model\Product\Option\Validator\Select::validateOptionValue without 'is_delete' key. Can you recheck if this issue still occurs? Thanks! |
Hi @adifucan, the same steps as you described:
This is what a have as a dump of values in Magento\Catalog\Model\Product\Option\Validator\Select::validateOptionValue Array
(
[44] => Array
(
[sort_order] => 0
[option_type_id] => 44
[is_delete] =>
[title] => Red
[price] =>
[price_type] => fixed
[sku] =>
)
[45] => Array
(
[sort_order] => 1
[option_type_id] => 45
[is_delete] =>
[title] => Blue
[price] =>
[price_type] => fixed
[sku] =>
)
[46] => Array
(
[sort_order] => 2
[option_type_id] => -1
[is_delete] => 1
[title] =>
[price] =>
[price_type] => fixed
[sku] =>
)
) Version 2.0.4. I have sent a pull request with cleaning out deleted values. |
Hi @igrslv! I could not reproduce this bug because I tested it on https://github.corp.magento.com/magento2/magento2ce/tree/develop and you are talking about https://github.corp.magento.com/magento2/magento2ce/tree/2.0, right? I do not mind to merge your pull request but you need to create it for branch 2.0 but not develop as on develop this bug is not reproduced. Or I can create pull request by myself based on your fix. One more remark is that you need to walk through array in \Magento\Catalog\Model\Product\Option\Validator\Select::validateOptionValue (string 72) not by foreach ($option->getData('values') as $value) but by foreach ($values as $value) because filtered deleted values are in $values array but not in $option->getData('values'). |
Hi @adifucan, please create PR. You are right, I had to create it for 2.0 branch. Thanks |
@adifucan, according to foreach loop, this is actually another bug which is already fixed in the develop branch. |
@piotrekkaminski yes please. |
Closed. |
MC-15873: Catch unserializer exception
Steps to reproduce
Expected result
Product must be saved without error messages.
Actual result
Error message appears: "Invalid option value".
The text was updated successfully, but these errors were encountered: