- Issue created by @jurgenhaas
- 🇩🇪Germany jurgenhaas Gottmadingen
The error is caused by
\Drupal\eca_form\HookHandler::inlineEntityFormAfterBuild
. When I disable that callback by inserting areturn $form;
into the first line of it, the error disappears.The problem is that IEF is not creating the correct embedded entity, at the same time there are no error messages or exceptions whatsoever.
- 🇩🇪Germany jurgenhaas Gottmadingen
Also, selecting an existing entity in such complex IEFs doesn't work either. See also 🐛 Nested IEF (complex form) stopped working for inner form Active .
A matter of fact, IEFs with the simple widget are not affected.
I'll start with an MR to disable the hook handler for complex IEFs so that people can use that patch until we've found a proper solution for this.
- 🇩🇪Germany jurgenhaas Gottmadingen
Turn out, when we revert the "bugfix" from 🐛 An error occurred while trying to build an inline entity from submitted form values Fixed then the issue disappears as well.
- Merge request !446Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget → (Merged) created by jurgenhaas
- Status changed to Needs work
3 months ago 1:27pm 22 August 2024 - 🇩🇪Germany jurgenhaas Gottmadingen
I've now disabled that code block from the other bug fix, but only for complex IEF widgets. This is just a workaround, but that can be applied to avoid that issue for now.
-
jurgenhaas →
committed 1b2c2c36 on 2.0.x
Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget
-
jurgenhaas →
committed 1b2c2c36 on 2.0.x
-
jurgenhaas →
committed b67cc77d on 2.1.x
Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget
-
jurgenhaas →
committed b67cc77d on 2.1.x
- 🇩🇪Germany jurgenhaas Gottmadingen
I have now disabled that complex widget hook entirely until we get a solution for this.
- 🇩🇪Germany jurgenhaas Gottmadingen
Turns out, disabling complex widgets entirely breaks some existing models, that otherwise with the workaround from the MR would be OK.
So, we're now merging and back porting the MR, publish another bug fix release and then hope that we can still find a proper solution for the underlying problem. But at least we would not be breaking anything in the meantime.
-
jurgenhaas →
committed 6e183c9e on 2.1.x
Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget
-
jurgenhaas →
committed 6e183c9e on 2.1.x
-
jurgenhaas →
committed b371ed90 on 2.0.x
Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget (...
-
jurgenhaas →
committed b371ed90 on 2.0.x
-
jurgenhaas →
committed 4afdbde7 on 2.1.x
Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget
-
jurgenhaas →
committed 4afdbde7 on 2.1.x
-
jurgenhaas →
committed 38c25cdb on 2.0.x
Issue #3469697 by jurgenhaas: ECA Form breaks complex IEF widget (...
-
jurgenhaas →
committed 38c25cdb on 2.0.x
- 🇬🇧United Kingdom lexsoft London
@jurgenhaas
Upgrading ECA from version 1.x to 2.x on Drupal 10.3.7 generates a warning related to the use of eca_form alongside inline_entity_form 3.x when initializing content entities using the complex widget with AJAX. The warning message displayed is:
“An error occurred while trying to build an inline entity from submitted form values. This might be a problem if you are using ECA to extend inline entity forms. Please report this to the ECA issue queue to help us improve it.”
Upon investigation, it appears that the condition in the code checks for:
if ($form['#eca_ief_info']['widget_plugin_id'] !== 'inline_entity_form_complex') {
However, in our case, we are using the IEF Table View Mode module https://www.drupal.org/project/ief_table_view_mode → . I would like to suggest modifying this condition to use a regular expression that matches inline_entity_form_complex, which would also account for custom plugins. This change could help ensure broader compatibility.