Documentation for batch api callback_batch_finished() doesn't say that a RedirectResponse can be returned.

Created on 14 March 2017, about 8 years ago
Updated 19 June 2024, 12 months ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21fo...

Enter a descriptive title (above) relating to function callback_batch_finished, then describe the problem you have found:

While batch_process does indicate that a RedirectResponse can be returned, callback_batch_finished does not but the code for it indicates that it is possible to redirect a RedirectResponse (and it works as such).

    // Determine the target path to redirect to. If a batch 'finished' callback
    // returned a redirect response object, use that. Otherwise, fall back on
    // the form redirection.
    if (isset($batch_finished_redirect)) {
      return $batch_finished_redirect;
    }

I would suggest we update it to match batch process by adding the following:

Return value
\Symfony\Component\HttpFoundation\RedirectResponse|null A redirect response if the batch is progressive. No return value otherwise.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
DocumentationΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom scott_euser

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024