Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The first data argument to drupal_execute() is being removed before drupal_retrieve_form() is called. The array_slice() in drupal_execute() is dropping the first 3 arguments instead of the first 2.
Some of the affected forms are node_form and taxonomy_form_term
Comment | File | Size | Author |
---|---|---|---|
#3 | drupal_execute_fixes_3.patch | 2.21 KB | asimmonds |
form_drupal_execute.patch | 687 bytes | asimmonds | |
Comments
Comment #1
yched CreditAttribution: yched commentedI'm not exactly sure what this patch fixes, but it does not remove the PHP warnings reported in http://drupal.org/node/144025
(which I maybe hastily marked as duplicate of this one) - we should probably tackle all the drupal_execute errors in one go...
notice: Undefined index: submitted in includes\form.inc on line 865.
notice: Undefined index: form_build_id in includes\form.inc on line 283.
notice: Undefined index: form_build_id in includes\form.inc on line 284.
Comment #2
asimmonds CreditAttribution: asimmonds commentedA little more of a explanation, taking the drupal_execute() node creation example from form.inc:
Before this patch, with the argument rearranging in drupal_retrieve_form(), the $node argument will not be passed through to the node_form function.
Comment #3
asimmonds CreditAttribution: asimmonds commentedAttached is a patch that I use to run drupal_execute on current HEAD without any warnings generated.
The $args juggling in drupal_execute() is not required anymore.
Comment #4
Dries CreditAttribution: Dries commentedWorks for me! Committed. Thanks.
Comment #5
(not verified) CreditAttribution: commented