Wrong language in menu_entity_index table target_langcode field
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2927186. --> Reported by: [seanb](https://www.drupal.org/user/545912) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In a multilingual site the target_langcode column in the database is filled by <code>$target_entity-&gt;language()-&gt;getId()</code>. Since this will always return the default language, it creates issues when you have links in different languages.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>It would probably be best to use the <code>MenuLinkContent</code> language so the relation in views fetches the right entry in the <code>node_field_data</code> table.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Change the <code>\Drupal\menu_entity_index\Tracker::addEntityTargets()</code> method to use the menu link content language as target language.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>-</p> <h3 id="summary-api-changes">API changes</h3> <p>-</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>-</p>
issue