Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295524

The BaseFieldOverride entity fails to normalize default values into the "array keyed by delta" format in the same way BaseFieldDefinition does when a callback is specified

$
0
0

Problem/Motivation

Discovered in test fails in #2949964: Add an EntityOwnerTrait to standardize the base field needed by EntityOwnerInterface.

BaseFieldDefinition::getDefaultValue normalizes default field values into always being an array keyed by delta. FieldConfigBase::getDefaultValue does not do this. When a BaseFieldOverride entity is created default values that used to work no longer do.

Proposed resolution

Fix \Drupal\Core\Field\FieldConfigBase::getDefaultValue to include the same logic as \Drupal\Core\Field\BaseFieldDefinition::getDefaultValue.

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 295524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>