compatibility with multistep

Created on 6 February 2013, almost 12 years ago
Updated 8 January 2025, 27 days ago

IEF doesn't work correct when added as a field inside of a multistep enabled node (referenced entity does not get created).

I tracked it down to inline_entity_form_process_entity_form().

function inline_entity_form_process_entity_form(&$entity_form, &$form_state) {
  // Only react on submissions triggered by the main submit buttons.
  $triggering_element_name = end($form_state['triggering_element']['#array_parents']);
  if (empty($form_state['triggering_element']['#ief_submit_all']) && !in_array($triggering_element_name, array('ief_add_save', 'ief_edit_save'))) {
    return;
  }

When someone saves the node with multistep, the triggering element is not ief_add_save or ief_edit_save, but just "save" (which I think multistep adds).

I removed the return and it works as expected on save, but this also means it saves on preview and other button actions.

Probably need to find a better way of detecting when the node is being saved other than checking the triggering element name.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States djdevin Philadelphia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024