Here's an issue I've found when trying to integrate Modal Frame to deal with node edit forms.

node_form_submit() makes a particular use of form api, that changes the order on how submit handlers are executed. And that rises an issue with form api that I was not aware of when I dessigned the way Modal Frame inners deal with form submit handlers.

The problem is that we're injecting our submit handler during after_build callback, but that only works for submit handlers not directly attached to buttons. Form API takes the list of submit handlers attached to buttons from the form structure BEFORE after_build is being invoked, see form_builder_handle_input_element(), therefore our newly added submit handler is not invoked. Fortunately, Form API saves this list in the $form_state['submit handlers'] array, and that's something we can change from our after_build callback.

The patch to fix this is coming...

Comments

markus_petrux’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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