Error when entity reference is stale

Created on 13 May 2022, about 2 years ago
Updated 3 February 2023, over 1 year ago

Problem/Motivation

When a referenced entity is missing (data inconsistency) the following error appears:

Error: Call to a member function getValue() on null in Drupal\custom_elements\Processor\DefaultFieldItemProcessor->addtoElement() on line 40...

Proposed resolution

Add a check for existing target before trying to load it.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania aludescher

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.

Production build 0.69.0 2024