InlineFormBase::alterInlineForm() is fired within a #process.

This means that hook_commerce_inline_form_alter() is fired when the form is already being processed, which is fine for simple alters ("hide field X" as used by commerce_tax), but fails subtly with complex alters which add their own elements, such as the one I'm using for #2852207: Billing same as shipping.

So, we need to stop doing that, and fire the hooks elsewhere.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Status: Active » Needs review
FileSize
3.82 KB

This is the cleanest fix I could come up with, which doesn't involve breaking BC for inline form implementations. Alter-ception!

  • bojanz committed 6aa26ab on 8.x-2.x
    Issue #3113882 by bojanz: The inline form alter hooks must not be fired...
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.