Thanks for this easy to use module.

Issue -
The forms submitted programmatically using drupal_execute() should not be altered by the ajax ui module. When this forms are altered, ajax_submitter() gets called as one of the submission function. This terminates the script abnormally. The caller of drupal_execute() never gets the control back as the script exits.

This affect programmatic creation/update of all the nodes.

Comments

brendoncrawford’s picture

Assigned: Unassigned » brendoncrawford
Priority: Normal » Critical

Greylogic,

Thanks. Having a look

brendoncrawford’s picture

Status: Active » Postponed (maintainer needs more info)

Greylogic,

As far as I can see, there is no way to actually determine if a form was submitted through drupal_execute vs an actual form submission. Unless, there is a way to make this determination, the form will just need to be disabled from using Ajax.

greylogic’s picture

Title: programmatic form submissions affected by Ajax form alter » $form['#programmed']

Hi,

thanks for the quick response.

The form api sets a $form['#programmed'] to TRUE for all the forms submitted using drupal_execute(). when you run drupal_execute(), Drupal retrives the form (drupal_retrieve_form) and then prepares it. During this preparation phase $form['#programmed'] will be set to true.

All the form altering functions gets called after setting this flag. So in your code, both in alter hooks or in the submission functions a check ($form['#programmed'] !== TRUE) can be put to make sure the ajax doesn't interfere with forms created during calls to drupal_execute().

cheers

greylogic’s picture

oops realized that i changed the topic of this issue to $form['#programmed']. posting to change it back.

brendoncrawford’s picture

Title: $form['#programmed'] » programmatic form submissions affected by Ajax form alter

This has been fixed in 6.x-1.x-dev. Please allow up to 12 hours for the dev package to update.

Thanks,
brendon

brendoncrawford’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

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