Fix `getReferencedEntitiesFromField` not getting correct translation

Created on 5 March 2023, over 1 year ago
Updated 19 March 2023, over 1 year ago

At a certain point, tests stopped running on Drupal.org - not sure exactly when. I've re-enabled it, but on the 1.0.x branch a test is failing.

The issue is that the parent entity is translated, but upon this (from https://git.drupalcode.org/project/pluggable_entity_view_builder/-/blob/...):

// Output the referenced entities if any.
$referenced_entities = $this->getReferencedEntitiesFromField($entity, 'field_reference');

We get the non-translated entity, and it fails https://git.drupalcode.org/project/pluggable_entity_view_builder/-/blob/.... According to test it should have worked in the past, so surely something has changed.

PR will follow

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇱Israel amitaibu Israel

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