By narendrar on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
11.x
Introduced in version:
11.2.0
Issue links:
Description:
Previously, it was possible for a view mode to have an empty string in its description field. For example, this was allowed (core.entity_view_mode.node.full.yml):
langcode: en
status: false
dependencies:
module:
- node
id: node.full
label: 'Full content'
description: ''
targetEntityType: node
cache: true
As of #3445150: Add validation constraints to core.entity_view_mode.*.*, this field cannot be an empty string; it will violate config schema. The reason is because an empty string makes no sense for this field. "" is never a useful description of a view mode.
If you want it to have no description, it must be NULL:
langcode: en
status: false
dependencies:
module:
- node
id: node.full
label: 'Full content'
description: null
targetEntityType: node
cache: true
Note that, if this field is NULL, \Drupal\Core\Entity\EntityDisplayModeBase::getDescription() will still return empty string, for backwards compatibility.
Impacts:
Site builders, administrators, editors
Module developers