Needs work
Project:
Plugin
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
30 Jun 2019 at 22:02 UTC
Updated:
25 Jul 2019 at 21:35 UTC
Jump to comment: Most recent, Most recent file
PluginSelector uses the base implementation of ::formMultipleElements(), which by default shows an empty form for fields which have multiple or unlimited cardinality. This creates a condition where the form may not allow the form to save if the user wishes to input fewer than the maximum items. The enclosed patch copies the base logic but omits this behavior, akin to paragraphs module and others which encapsulate complex subforms.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | interdiff.txt | 574 bytes | bradjones1 |
| #3 | 3065047-plugin-multiple-select-3.patch | 4.48 KB | bradjones1 |
Comments
Comment #3
bradjones1Quick update to accommodate empty sets (e.g., on creation).
Haven't had a chance to look at the test fails, yet.
Comment #4
joachim commented> The enclosed patch copies the base logic but omits this behavior, akin to paragraphs module and others which encapsulate complex subforms.
That's a LOT of base class logic we're copying! That's a bad code smell. This looks to me like we should be making a patch on core to make it easier to change just the behaviour we need to change.
Comment #5
bradjones1Agreed - and I actually ran into an additional weird situation here with
WidgetBase::addMoreAjax(), so agreed this is either buggy in core or we need to improve core in order to support this type of situation.