Fix for translation merging

Created on 21 March 2025, 13 days ago

Problem/Motivation

The vertical aggregator can leave out items it doesn't find.
This conflicts with the current way the translation handling works which assumes there's always a related entry in the data list.

Related error: Undefined array key "61b0e9b1-6681-4911-809a-REDACTED" in Drupal\external_entities\ExternalEntityStorage->mapRawDataToExternalEntities() (line 763 of modules/contrib/external_entities/src/ExternalEntityStorage.php

Related log entries: Error while mapping translation data for external entity 61b0e9b1-6681-4911-809a-REDACTED: Drupal\external_entities\ExternalEntityStorage::extractEntityValuesFromRawData(): Argument #1 ($raw_data) must be of type array, null given, called in /var/www/drupal/docroot/modules/contrib/external_entities/src/ExternalEntityStorage.php on line 763

Steps to reproduce

Use vertical aggregation with translation merging.
One language source should not provide one of the languages.
This should trigger the error.

Proposed resolution

Add a check if the item is there at all before processing anything.

Remaining tasks

  1. Write Code
  2. Review

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇭Switzerland das-peter

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024