Drupal Core Update: Mandatory Values for Node Type Fields

Drupal

The recent update in Drupal Core version 10.3.0, as detailed by Adam G H, brings a significant change regarding the 'help' and 'description' fields within node types. Previously, these fields could contain empty strings by default, but this will no longer be permitted. 

The alteration, implemented in #3379091, makes NodeType config entities fully validatable, and enforces that these fields cannot be empty strings to comply with the config schema, as empty strings are deemed nonsensical for this purpose. If empty values are required, they must be explicitly defined as NULL. It's worth noting that despite this change, functions such as \Drupal\node\Entity\NodeType::getDescription() and \Drupal\node\Entity\NodeType::getHelp() will continue to return empty strings for backward compatibility if the fields are set to NULL. This adjustment can have impacts on module developers, themers, and distribution developers as they adapt to this new guideline. 

Gather more information here.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here