Return HTTP 404 response instead of 302 for custom search path.

Created on 18 May 2023, about 1 year ago
Updated 30 October 2023, 8 months ago

Problem/Motivation

The search404 module is supposed to return 404 HTTP response even if it shows the search results. Currently it works with core search module. If custom search path is given, the search results page return HTTP response status 302 instead of 404.

Steps to reproduce

Enable "Do a "Search" with custom path instead of a Drupal Search when a 404 occurs" and input a custom search path. Then save the configuration and access a non existing URL. The expected HTTP response is 404, but here it returns 302.

Proposed resolution

We may need to handle it as a HTTP sub request as it is implemented in Drupal core for the "Default 404 (not found) page" settings in "Basic site settings".

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India emilymathew

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024