-
podarok →
committed bf8d55b4 on 2.0.x authored by
gauravjeet →
Issue #3315720 by gauravjeet: TypeError: krsort(): Argument #1 ($array)...
-
podarok →
committed bf8d55b4 on 2.0.x authored by
gauravjeet →
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Needs review
11 months ago 6:31pm 9 December 2023 - Status changed to Needs work
11 months ago 4:19pm 23 December 2023 - 🇺🇸United States dcam
This needs better steps to reproduce the problem, specifically in regard to the configuration of the entities involved. Does the node have the IEF field or the block? Are you placing the block on the node type's default layout or customizing the layout of a single node? Does the IEF field (whatever entity it's attached to) need to have entities referenced or be empty? I've tried every combination that I can think of and can't reproduce the problem. I'll admit that the code looks like it has this issue. But if it can't be reproduced then that's a problem because if it's a bug then this also needs tests.
- Status changed to RTBC
10 months ago 9:57pm 7 January 2024 - 🇩🇪Germany geek-merlin Freiburg, Germany
Ohoh, i remember well when i coded that. Context:
$widget_states =& $form_state->get('inline_entity_form'); // Widget states can be in an arbitrary order depending on user's form // interaction. We sort them lexicographically in reverse order to get inner // forms before outer forms, to ensure inside-out saving of entities. // @see \Drupal\inline_entity_form\Plugin\Field\FieldWidget\InlineEntityFormBase::makeIefId krsort($widget_states, SORT_STRING);
No guarantee that there are widget states at this point. So it's as simple as this one with no regression risk:
$widget_states =& $form_state->get('inline_entity_form') ?? [];
- 🇩🇪Germany geek-merlin Freiburg, Germany
Ah, i forgot the
=&
which makes #9 impossible and mandates the extra line from #3.
-
geek-merlin →
committed 84fdbdbe on 3.x
Issue #3315720 by gauravjeet, geek-merlin, podarok, dcam: TypeError:...
-
geek-merlin →
committed 84fdbdbe on 3.x
- Status changed to Fixed
10 months ago 10:01pm 7 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.