- Issue created by @klaasvw
- Merge request !11Disable field cardinality only for entity_reference_display fields. → (Merged) created by klaasvw
- Status changed to Needs review
3 months ago 6:34pm 17 September 2024 - 🇧🇪Belgium klaasvw
The MR and patch attached fixes the bug by checking the field type for both forms. It also refactors the code to use hook_form_FORM_ID_alter to prevent code duplication, and fixes the coding standards warnings.
- 🇨🇷Costa Rica maxmendez
The patch seams to work correctly. Thanks for your work.
PR has been merged to 2.0.x
It will be rolled out in next release.-
naveenvalecha →
committed eb881e14 on 2.0.x authored by
klaasvw →
Issue #3475014 by klaasvw, naveenvalecha, maxmendez: Field cardinality...
-
naveenvalecha →
committed eb881e14 on 2.0.x authored by
klaasvw →
- 🇩🇪Germany Anybody Porta Westfalica
@naveenvalecha I think there's still a bug or a regression now:
When trying to config-translate an order type in Drupal commerce, I get this unrelated error:
TypeError: entity_reference_display_disable_cardinality_settings(): Argument #1 ($cardinality_container) must be of type array, null given, called in/web/modules/contrib/entity_reference_display/entity_reference_display.module on line 23 in entity_reference_display_disable_cardinality_settings() (line 34 of modules/contrib/entity_reference_display/entity_reference_display.module).
at
/admin/commerce/config/order-types/default/edit/fields/commerce_order.default.shipments
Can you see code-wise why that happens? We're not using entity_reference_display on that entity type at all!
Reproduction won't be that easy as Drupal commerce is heavy + multilang.Should we open a new issue for that or solve it here?
- 🇯🇵Japan eleonel Itoshima 🇯🇵
I pushed a fix on 2.0.x branch to validate the value of $cardinality_container before calling the function.