Warning on 404 page creation

Created on 25 July 2023, over 1 year 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

🇧🇪Belgium L_VanDamme

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

Comments & Activities

Production build 0.71.5 2024