- Issue created by @jvogt
- πΊπΈUnited States jvogt Seattle, WA
I think it's due to this line being remove in commit 7ec4b704 (line 399 in src/ConditionalFieldsFormHelper.php), causing the dependentValidation to execute when saving conditions:
if (!isset($form['#conditional_fields'])) { return; }
If you add that back in just after the following, the error goes away and the conditional field rules work:
$inline_entity_form_parents = self::findInlineEntityFormParentsForElement($form, $element); if ($inline_entity_form_parents) { $form = NestedArray::getValue($form, $inline_entity_form_parents['element_parents']); }
I don't know if this is the correct solution as the removal may have been intentional in issue 2856720 β¨ Support for Inline Entity Form Fixed . However, I tested the fix with my initial conditions and the conditional fields inside an "Inline entity form - Simple" and it worked. I didn't test with "Inline entity form - Complex".
- πΈπ°Slovakia coaston
+1 I have got the same issue.
I am not using Inline Entity Form and I do not have installed it.In my case I have used dependency to field "B" and then I reused this field in another content type . However it takes from some reason dependency and it is displayed in the second content type and also to field "B" however such field "B" is not reused in the second content type, just the field "A" has been reused.
When I want to update that dependency now in the first content type I am getting this issueBut this
if (!isset($form['#conditional_fields'])) {
return;
}Resolved the issue.
Please try to create a patch.
- πΊπΈUnited States jvogt Seattle, WA
Thanks for confirming! Here's a patch.
- Status changed to Needs review
3 months ago 12:42pm 24 August 2024