Rendered entity (reference) formatter uses wrong view mode

Created on 22 January 2025, 2 months ago

Current situation

  1. Taking the Drupal CMS standard-installed blog post as example: if we change the "Tags" field to have "Rendered entity" formatter and do not edit the formatter settings, we see:

      "content": {
        "element": "node-blog",
        "created": "1724414516",
        "tags": [
          {
            "element": "taxonomy-term-tags-full",
            "name": "Drupal"
          }
        ],
    

    Note the element name containing "-full", despite the fact that the field formatter summary displays "Default".

  2. If we edit the formatter settings and immediately save, the element name becomes "taxonomy-term-tags".

  3. "1" happens only when the CE display for the taxonomy bundle isn't saved yet.

    If we do not do '2' but only visit /admin/structure/taxonomy/manage/tags/overview/ce-display and immediately save without changing anything on the screen:

    the element name also becomes "taxonomy-term-tags".

Problem/Motivation

At the very least, the settings summary should be consistent with the actual output.

There are different reasons for the behavior change between '1 vs 2' and '1 vs 3'. (I need to write up details here. Soon.)

Proposed resolution

TBD (we could either keep the current behavior and make the UI reflect this, or change "1".)

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

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

Comments & Activities

Production build 0.71.5 2024