When I go to advanced inventory and want to set Manage Stock to No I only have the option Yes available. But why?
I have no idea where to start debugging any clue would be appreciated or maybe someone faced the same problem?
I already checked Stroes > Settings > Configuration > Catalog > Inventory settings and they look fine.
I don't know if it's related but how I found this bug was because a product I just created is apparently not salable and not listed in cataloginventory_stock_status
table.
Update:
I figured out a bit more. The same problem affects Qty Uses Decimals too. In Magento_Ui/js/form/element/select::setOptions the following options are set for the selects Manage Stock, Qty Uses Decimals and Allow Multiple Boxes for Shipping:
this.options
is set to the result of parseOptions()
which gets data
passed. In two of the cases the value 0
for label "No"
is passed as integer and once as string. That's why parseOptions()
will set the label to ' '
.
The label is ' '
but the source code for the select then is <option data-title value="0"></option>
can anyone explain this or has an idea why?
Does anyone know where the data for the options is passed to the select ui component?