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.
drupal_validate_form() caches $validated_forms. This means that you cannot call the same form twice via drupal_execute() in one page view safely. The second and all successive calls will not call the form's validate function. Instead, they will pass on to the submit.
My proposed fix to this bug will address all uses of static caching arrays like this one throughout core and contrib; they all have to go, but without killing the corresponding performance benefit. I'll be proposing a solution on the dev mailing list soon.
Comments
Comment #1
blhobbes CreditAttribution: blhobbes commentedsubscribing
Comment #2
Wim LeersSubscribing.
Comment #3
markus_petrux CreditAttribution: markus_petrux commented#148530: drupal_validate_form() problem with multiple drupal_execute()-s of the same form_id