Warning on 404 page creation

Created on 7 May 2025, 3 days ago

Problem/Motivation

When saving a Conditional404Page entity for the first time (on creation), following Warning is thrown:

Warning: Undefined array key "#empty_value" in Drupal\Core\Form\FormValidator->performRequiredValidation() (line 362 of core/lib/Drupal/Core/Form/FormValidator.php).

This is caused by the lack of a default value for the weight field.

Steps to reproduce

Install the module and create a Conditional404Page

Proposed resolution

Add a fallback for the weight field in case the entity does not exist.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kamkejj WI

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