External or all non internal links are not processed by this module. The rediscover flag must be set so they are process and decorated.

This code added. See github.

/**
 * When saving entity override the default logic in \Drupal\menu_link_content\Entity\MenuLinkContent::preSave
 * and set rediscover for any link that has a link_markup.
 * This is needed as only internal:// links are discovered and thus decorated.
 */
function menu_markup_menu_link_content_presave($menu_link) {
  $menu_link_options = $menu_link->link->first()->options;
  if (isset($menu_link_options['menu_markup']) && strlen($menu_link_options['menu_markup']['link_markup']) > 0) {
    $menu_link->setRequiresRediscovery(TRUE);
  }
}

Comments

Sumiko created an issue. See original summary.

geoanders’s picture

Version: 8.x-1.0 » 8.x-1.x-dev
Status: Active » Needs review