Problem/Motivation

We have some custom modules that are relying on certain items and adding things later in #process callbacks. IEF breaks this when submit handlers are copied to the submit element in hook_form_alter.

An example in contrib where this breaks is the File Entity Inline module.

Proposed resolution

Make this run as late as possible and do actual copying of submit handlers in an after_build callback instead. This way we can make sure this is running as late as possible.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

CommentFileSizeAuthor
#6 2589909-6.patch2.72 KBdamiankloip
#2 2589909.patch2.61 KBdamiankloip

Comments

damiankloip created an issue. See original summary.

damiankloip’s picture

Status: Active » Needs review
StatusFileSize
new2.61 KB
damiankloip’s picture

Issue summary: View changes
bojanz’s picture

Status: Needs review » Needs work

The code in #after_build is not the same as the removed code, looks like this was rolled against 1.5/1.6 and not -dev.

damiankloip’s picture

Whoops, sorry. I'll check that out. Thanks! :)

damiankloip’s picture

Status: Needs work » Needs review
StatusFileSize
new2.72 KB

OK, here is another go.

  • bojanz committed 619e02b on 7.x-1.x authored by damiankloip
    Issue #2589909 by damiankloip: inline_entity_form_form_alter changes to...
bojanz’s picture

Status: Needs review » Fixed

Committed, thanks.

bojanz’s picture

Status: Fixed » Needs work

  • bojanz committed 087106c on 7.x-1.x
    Revert "Issue #2589909 by damiankloip: inline_entity_form_form_alter...
donquixote’s picture

Just saying, one way to have an alteration happen "as late as possible" is to register a $form['#process'] handler.

bluegeek9’s picture

Status: Needs work » Closed (outdated)

We appreciate your contributions to Inline Entity Form. Drupal 7 in End-of-Life. We encourage you to upgrade to a supported version of Drupal.

//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.