Fix NodeType config entity type config schema violations: name, description, help

Created on 7 August 2023, over 1 year ago
Updated 15 December 2023, about 1 year ago

Problem/Motivation

Discovered in 📌 Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed .

For example:

1) Drupal\Tests\node\Kernel\NodeTypeValidationTest::testEntityIsValid
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for node.type.kddiqdxr with the following errors: 0 [description] This value should not be null., 1 [help] This value should not be null.

Steps to reproduce

Run Drupal core's test suite with 📌 Configuration schema & required values: add test coverage for `nullable: true` validation support Fixed applied, and with the lines

    'node.type.*' => [
      // @todo Fix config or tweak schema of `type: node.type.*`.
      // @see node.schema.yml
      'name' => [
        'This value should not be null.',
      ],
      'description' => [
        'This value should not be null.',
      ],
      'help' => [
        'This value should not be null.',
      ],
    ],

removed from \Drupal\Core\Config\Schema\SchemaCheckTrait::checkConfigSchema().

Proposed resolution

Solution:

  • or update node.schema.yml to allow description. to be null: add nullable: true (because it seems like it really should be optional and then the empty string makes no sense).

    ⚠️ … but also wait for the remainder of node.type.* to become validatable? The following property paths are not yet validatable at this time:

    1. preview_mode → happening in 📌 [PP-1] Make NodeType config entities fully validatable Needs review 👍

    Remaining tasks

    Fix all of these failures.

    User interface changes

    None.

    API changes

    None.

    Data model changes

    None.

    Release notes snippet

    N/A

  • 📌 Task
    Status

    Closed: outdated

    Version

    11.0 🔥

    Component
    Node system 

    Last updated 4 days ago

    No maintainer
    Created by

    🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

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

    Comments & Activities

    Production build 0.71.5 2024