It is not possible to override the system 404 page on D10.2+

Created on 19 August 2024, 3 months ago
Updated 10 September 2024, 3 months ago

Problem/Motivation

After upgrading from Drupal 10.0.11 to Drupal 10.2.7, the page__404.html.twig template is now listed and applied as a suggestion even if a node is set, which contradicts the following rule.

These templates are not used if a node is used for the 403/404 response.

https://www.drupal.org/node/2960810 β†’

It seems to be a core issue, not a bug on this module.
However, the suggestion hook is no longer necessary as the Drupal core already offers support to page__4xx templates.

Proposed resolution

Remove the page__404.html.twig and the hook_suggestion as content editors can easily create new 404/403 pages using a Page or Landing Page content types.

πŸ› Bug report
Status

RTBC

Version

3.1

Component

Code

Created by

πŸ‡§πŸ‡·Brazil andre.bonon

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024