Plone 6.2.2. I have a control panel settings page that needs a multi value, ordered field. I've tried both from plone.app.z3cform.widgets.select.AjaxSelectFieldWidget and Select2FieldWidget. They are both broken in different ways.
Select2FieldWidget does not correctly order. The UI appears to show it doing so, but the actual form data is not reordered and sent to the server that way.
AjaxSelectFieldWidget orders correctly but has a validation error:
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 179, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 388, in publish_module
Module ZPublisher.WSGIPublisher, line 282, in publish
Module ZPublisher.mapply, line 98, in mapply
Module ZPublisher.WSGIPublisher, line 68, in call_object
Module plone.app.content.browser.vocabulary, line 156, in __call__
Module plone.app.content.browser.vocabulary, line 317, in get_vocabulary
Module plone.app.dexterity.permissions, line 89, in validate
AttributeError: No such field: primary_idps
The Select2FieldWidget has been an issue before, but I thought that was related to an old version of select2.
With the Ajax version, it appears to be trying to get the field schema from the context - which is just the portal root. It's using the default Dexterity validator here.
Is there any easy way to get around this, or some other widget I should be using in the control panels?