Label formatter not properly applying overrides with "No link"

Created on 10 March 2021, about 4 years ago
Updated 22 May 2025, 13 days ago

Problem/Motivation

Some/all of the options for the "Label" formatter are not being properly applied. For example, when the "Replace the title" option is selected and the "Link label to the referenced entity" option is not selected, no replacement is done. There is a bug(s) in EntityReferenceOverrideLabelFormatter::viewElements().

There are probably similar bugs in the other formatter options.

Steps to reproduce

Add an Entity Reference Override field to an entity (use default configuration values), set its "Label" formatter to use the "Replace the title" option and do not select the "Link label to the referenced entity" option in the formatter configuration. Create and save an entity with the Entity Reference Override field. For example:

Upon saving, note that the label is not override with the proper value.

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡§πŸ‡ͺBelgium Jonasanne

    I'm having the same issue in Drupal 11.
    When I add the formatter this works perfectly when logged in.
    not logged in this is completely broken.

Production build 0.71.5 2024