drupal_form_submit ignores return value of drupal_process_form

Created on 20 August 2013, about 11 years ago
Updated 18 April 2024, 5 months ago

Problem/Motivation

I tried to redirect the user after he submitted the login form. So I created a new submit handler for the user-login-form (no problem here) and there I added a redirection target via $form_state['redirect'].

Because it didn't work, I took a look on the code and the functions are called like this:

drupal_form_submit > drupal_process_form > drupal_redirect_form
drupal_redirect_form returns a RedirectResponse object
drupal_process_form returns it to drupal_form_submit
and drupal_form_submit just ignores the return value of drupal_process_form.

Proposed resolution

I guess drupal_form_submit should handle the return value of drupal_process_form just like drupal_build_form.

In case I created a duplicate issue (I couldn't find any other issue) or it isn't actually a bug, please forgive me. ;-)

🐛 Bug report
Status

Needs work

Version

7.0 ⚰️

Component
Form 

Last updated 1 minute ago

Created by

🇩🇪Germany Tobias Xy

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Drupal 7 does not have a RedirectResponse class. If this bug is present in Drupal 7 too, the issue summary needs to be updated to report the steps to reproduce it on Drupal 7.

Production build 0.71.5 2024