Add extrafields support

Created on 21 August 2023, 10 months ago
Updated 26 September 2023, 9 months ago

Problem/Motivation

When the view mode that wants to be rendered as a component has a extrafield the following error appears:

Call to a member function getLabel() on null in Drupal\sdc_display\Form\ViewModeMappingsSettings->getDynamicMappingsSelectorOptions()

Steps to reproduce

  1. Go to manage display for an entity type with an extrafield.
  2. Select the checkbox to render the entity as a component.
  3. Save

Proposed resolution

The issue comes from a part of the code which is assuming that only entity fields will be rendered, so when it tries to extract the field configuration to get the label it fails.

Instead of just adding a condition to skip the extrafields, I prefer this module to support them, so they can appear in the field mapping.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇴Colombia jidrone

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

Comments & Activities

Production build 0.69.0 2024