Closed (fixed)
Project:
Ajax
Version:
6.x-1.12
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
15 Feb 2009 at 01:10 UTC
Updated:
1 Mar 2009 at 21:30 UTC
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
Comment #1
brendoncrawford commentedGreylogic,
Thanks. Having a look
Comment #2
brendoncrawford commentedGreylogic,
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.
Comment #3
greylogic commentedHi,
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
Comment #4
greylogic commentedoops realized that i changed the topic of this issue to $form['#programmed']. posting to change it back.
Comment #5
brendoncrawford commentedThis has been fixed in 6.x-1.x-dev. Please allow up to 12 hours for the dev package to update.
Thanks,
brendon
Comment #6
brendoncrawford commented