- Issue created by @DamienMcKenna
- πΊπΈUnited States DamienMcKenna NH, USA
I wonder if the issue is in EntityViewsData? It might be a generic issue with all entities, not just terms.
- πΊπΈUnited States DamienMcKenna NH, USA
The code in EntityViewsData::getViewsData() should look like this:
if ($data_table) { $data[$base_table]['table']['join'][$data_table] = [ [ 'left_field' => $entity_id_key, 'field' => $entity_id_key, 'type' => 'INNER', ], [ 'left_field' => 'langcode', 'field' => 'langcode', 'type' => 'INNER', ], ];
Unfortunately that doesn't work.
- πΊπΈUnited States DamienMcKenna NH, USA
This seems to cover it:
if ($data_table) { $data[$base_table]['table']['join'][$data_table] = [ 'left_field' => $entity_id_key, 'field' => $entity_id_key, 'type' => 'INNER', ]; // If the entity type is translatable another JOIN condition is required // on the langocde column to avoid duplicate records. if ($this->entityType->isTranslatable()) { $data[$base_table]['table']['join'][$data_table]['extra'][] = [ 'field' => $entity_keys['langcode'], 'left_field' => $entity_keys['langcode'], ]; }
- πΊπΈUnited States DamienMcKenna NH, USA
A patch containing the code from #4.
- πΊπΈUnited States DamienMcKenna NH, USA
This is related to π Views entity reference relationships must join on langcode for translatable entities Needs review but that only covers entity_relationship fields, not this core issue.
- πΊπΈUnited States DamienMcKenna NH, USA
This needs to be turned into a merge request and needs test coverage.
- πΊπΈUnited States DamienMcKenna NH, USA
I logged it against 10.3.x while I was first diagnosing the problem.