After upgrading from `conditional_fields 4.x-alpha5` to `4.x-alpha6`, an error occurs when handling paragraphs in the `ConditionalFieldsFormHelper` class.
1. Use a paragraph field with conditional fields enabled.
2. Ensure no specific form mode is explicitly selected.
3. Attempt to use the conditional logic that depends on the paragraph field.
4. The following error occurs:
Error : Call to a member function getComponent() on null in Drupal\conditional_fields\ConditionalFieldsFormHelper->getState() (ligne 371 de /var/www/preprod_filiale/releases/20250117120019Z/web/modules/contrib/conditional_fields/src/ConditionalFieldsFormHelper.php).
- The issue occurs because `$form_display->getMode()` returns the first unchecked form display mode instead of the default when no specific form mode is selected.
- This causes `$form_display` to be `null`, leading to an error when calling `getComponent()`.
- A patch has been provided to ensure that the correct form display mode is used, preventing null references.
Active
4.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.