When creating a new product ion the backend, the mainTaxon field is automatically populated with the value 1.
Moreover, we cannot remove the mainTaxon (i.e. set it to null)
I'm on the latest master.
Probably we should add required => false to the form type.
And somewhere in TaxonChoiceType there should be an option to set it to null I guess — I didn't really dive into the code but adding a choice => null should do the trick
@pamil please you make sure your changes in forms will include this fix 😉
This is more of an UI issue, I will fix it. (choices are not loaded, so it is using 1, 95% sure that's the problem) :D
Fixed.
It's fixed when we create a new product but I just tested on latest master and when you have selected a main taxon, you cannot remove it afterwards (no "null" option in the choice list) — or am I missing something ?
You're right, we should fix that also.
Do you have an update on this issue by any chance ?
I noticed that the mainTaxon also has issues (as far as I can tell) in https://github.com/Sylius/Sylius/issues/7343