Apply translatable_menu_link_uri.module Link override fields to sitemap menu when available

Created on 29 June 2022, almost 3 years ago
Updated 23 May 2025, 15 days ago

Problem/Motivation

Sitemap menu does not apply Link override fields provided by Translatable menu link uri module version 2.0.0 when the specified field is an absolute url

Steps to reproduce

  • Install / Enable Translatable menu link uri module version 2.0.0
  • Create a translated menu item and override the Link (all languages) field using Link override URL field
  • The overriden menu item url in sitemap page is not overriden

Proposed resolution

We solved it by adding the following hook preproccess at .theme file

/**
 * Implements hook_preprocess_HOOK() for sitemap-menu.html.twig.
 */
function hook_theme_preprocess_sitemap_menu(&$variables) {
  foreach ($variables['items'] as &$item) {
    translatable_menu_link_uri_iterate_menu($item);
  }
}

Note that translatable_menu_link_uri_iterate_menu($item) function is provided by the Translatable menu link uri module

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Component

Code

Created by

🇪🇸Spain julio.raimondi Barcelona, Spain

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.

Production build 0.71.5 2024