Selection of first custom field in product editing (FIXED)

Started by Alexb65, November 30, 2022, 14:43:28 PM

Previous topic - Next topic

Alexb65

Hi all
I'm facing a trouble that I'm unsure is a (minor) bug or a problem of my installation
First things first:
Joomla 4.2.5
VM 4.0.8 10748
PHP 8.0
When I go to edit a product and need to add a custom field, the select listing custom fields has the first option already selected but I cannot add it to the product.
To add the "defalult" selected field I need to select a different custom field to be added to the product and then switch back to the first custom field in select to have it added.
Inspecting the select options only custom fields are listed with correct id and name
Shoudl a "select" with option zero be present to allow to add the first custom field to the product's vustom field?
I have worked around creating a "private note" custom field to select and thn come back
I suspect it works on "onchange" so if the fist option is already selected the event doesn'fire
Thank you in advance for any suggestion
How may I fix ehis?

Milbo

Thank you for this observation. Looks like the empty option is missing. I did not notice, because by the sample data the first is "group" which is almost never used
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Alexb65

You're welcome

You're doing a such big nice work that small bugs like this are nothing compared to the rest!

Milbo

Many thanks to you. I just added the empty option for the next release (should be tomorrow)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Alexb65