When looking for the most popular menu name among translations, _menu_link_sync_get_most_popular_menu_among_siblings include the node.
Because Node:load() return the cached version of the node, drupal return the temporary translation.
That mean when syncing MenuLink when creating a translation, Node:load() will return an existing translation with the source translation values.
Ex, when translating a menu in English:
field_menulink:
en:
-
menu_name: main_menu_en
de:
-
menu_name: main_menu_en
- Add a translation to a node
- Sync menulink
- Use debug tools to inspect loop
Ignore menu item based on MenuPluginId
Active
Code