When Batch ID doesn't exist, Drupal should emit a 404

Created on 3 May 2013, about 11 years ago
Updated 7 February 2023, over 1 year ago

Problem/Motivation

Currently if you try to go to /batch?id=123 you get redirected to the homepage with a message stating "No active batch".

Proposed resolution

Since the batch doesn't exist Drupal should just emit a 404 instead.
Display an error message to the user.

Remaining tasks

  1. #193, code review and testing

User interface changes

Error message displayed, "No batch with ID 20 exists."

Before

There is a redirect to the home page:

After

There is a 404 response instead of a redirect, and the error message is updated.

API changes

None

🐛 Bug report
Status

Needs work

Version

10.1

Component
Batch 

Last updated 7 days ago

Created by

🇺🇸United States timaholt

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

    Primarily changes documentation, not code. For Drupal core issues, select the Documentation component instead of using this tag. In general, component selection is preferred over tag selection.

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.

Production build 0.69.0 2024