- Issue created by @stefan.korn
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:25am 15 June 2024 - Status changed to Postponed: needs info
6 months ago 2:46pm 14 April 2025 - πΊπΈUnited States smustgrave
Based on the steps what's covered here that was not in https://www.drupal.org/project/field_config_cardinality/issues/3205212 β¨ Restore Paragraphs' Collapse and Drag & Drop functionality Needs review
- Status changed to Active
4 months ago 2:05pm 2 July 2025 - πΊπΈUnited States bvoynick
In template_preprocess_field_multiple_value_form() $item['_actions'] is checked for existence, and carried forward into cell 3 of 4 in the row cells/'data'. field_config_cardinality is out of step with this more recent change to core, which is what patch #2 addresses.
Note that this change was only introduced in Drupal 10.2. See https://www.drupal.org/project/drupal/issues/1038316 π Allow for deletion of a single value of a multiple value field Fixed For the 4.x branch of this module, that's not a problem as minimum version is already higher than 10.2. But for a backport to 3.x, compatibility with Drupal 10.1 and below - which did have this code for an actions column - would have to be considered.
I'm experiencing the symptom stefan.korn mentioned of tabledrag show/hide for row weights not working properly, on a Drupal 11.2 site. At least on this particular 11.2 site, patch #2 is not enough to restore the show/hide functionality. I'm currently looking into what else might have changed in template_preprocess_field_multiple_value_form() in recent releases, maybe there is something else to also take into account.
- πΊπΈUnited States bvoynick
The further trouble with weights show/hide seems to be related to this change released in core 10.4 and 11.1. $order_class changed to be based on the table ID, which uses Html::getUniqueId() to assure uniqueness.
I see in theory why that would put field_config_cardinality out of step once again. And I think the reason it's such a universal problem to FCC-altered fields in practice is that getUniqueId() transforms underscores to dashes - e.g. $order_class = 'field-name-delta-order' - while the old approach of using the field name didn't transform anything and so $order_class = 'field_name-delta-order'
- πΊπΈUnited States bvoynick
MR 20 is ready for review and should fix both regressions, and associated, for FCC 4.0.x.
Backport to 3.x would require putting the 'actions' fix inside conditionals to keep the old behavior on Drupal 10.1-
The MR does nothing to address stefan.korn's point about, does the module actually need to duplicate all the steps that it does from Core's theme function. Afraid I don't have time to dive into that myself.
- πΊπ¦Ukraine abramm Lutsk
I've faced the same issue, but I've come to a different solution before I've seen the MR.
Instead of trying to replicate the core behavior, my patch simply extracts the class name produced by core. - πΊπΈUnited States smustgrave
Like to try a solution that doesn't require checking core version if possible.
- πΊπ¦Ukraine abramm Lutsk
Like to try a solution that doesn't require checking core version if possible.
That's exactly what's done in #12.
Do you want me to create the MR? - πΊπΈUnited States smustgrave
Almost the entire issue queue seems to be bugs and probably because it lacks test coverage. I'm working on adding some basic coverage so we can wait on those are start new ones too
- πΊπΈUnited States smustgrave
Seems to be failing 10.5 will have to figure that out then we can merge.
- πΊπΈUnited States smustgrave
This is the last bug on the list and we can do another release
-
smustgrave β
committed 120f551f on 4.0.x authored by
bvoynick β
Issue #3454609 Regression from [#1038316] Allow for deletion of a single...
-
smustgrave β
committed 120f551f on 4.0.x authored by
bvoynick β
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
25 days ago 2:29pm 29 September 2025