ContentEntityDenormalizer uses the field map, and so is unaware of bundle fields

Created on 6 May 2025, 6 days ago

Problem/Motivation

The EntityFieldManager's field map is not aware of bundle fields declared in code -- this is a longstanding core bug #3045509: EntityFieldManager::getFieldMap() doesn't show bundle fields .

Because of this, ContentEntityDenormalizer doesn't process any bundle fields, and if incoming JSONAPI data has a value for a bundle field, it will throw an exception.

Steps to reproduce

Proposed resolution

The field map is used rather than loading field definitions because it's a more lightweight data structure, so rather than switching wholesale, fall back to checking the field definitions when the field is not found.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

jsonapi.module

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024