Translate entity aggregated processor prescribes acceptable datasource ID

Created on 3 February 2021, over 4 years ago
Updated 16 June 2025, 18 days ago

Problem/Motivation

Currently the TranslateEntityAggregatedFieldProcessor will (as far as I can see) only work with the content entity datasource as it explodes the ID based on the "entity:node" format, disallowing use with custom datasource's.

This is counter to the rest of the processor which works fine with a custom datasource.

Proposed resolution

Alter the build method to load the datasource and extract the entity type ID using the provided getEntityTypeID() method.

API changes

This should not affect the API, as its using methods already prescribed by the DatasourceInterface.

✨ Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom andy_w

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.

  • πŸ‡ΊπŸ‡¦Ukraine khiminrm

    I've faced with another but I think related issue.

    In our case there is more complex pattern for one of the fields in configuration of the aggregated field.

    I have such configuration:

    entity:commerce_product_variation/field_unique_attributes
    entity:commerce_product_variation/product_id:entity:field_unique_attributes

    So one field is taxonomy field from a product variation and another one is taxonomy field from the parent product's taxonomy field.

    And current code takes correct value for the first field but then overrides it with the product's label not label from the product's taxonomy field.
    The patch works for the first field but doesn't work for the second field - $field_storage = NULL

Production build 0.71.5 2024