Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293417

Migrations of menu links associated with entities failing

$
0
0

After performing a menu link migration from Drupal 6 to Drupal 8 the menu is not associated with the node and is not in the Menu System form when editing the node.

The link__uri is stored as link__uri='internal:/node/9831' and is unrouted.

drush ev "print_r(Drupal\Core\Url::fromUri('internal:/node/9831'))"
Drupal\Core\Url Object
(
    [urlGenerator:protected] => 
    [urlAssembler:protected] => 
    [accessManager:protected] => 
    [routeName:protected] => 
    [routeParameters:protected] => Array
        (
        )

    [options:protected] => Array
        (
        )

    [external:protected] => 
    [unrouted:protected] => 1
    [uri:protected] => base:node/9831
    [internalPath:protected] => 
    [_serviceIds:protected] => Array
        (
        )

)

When I edit the node and add a menu item the form created a new menu entry and stores the link__uri as 'entity:node/9831'. If I remove the new menu item when editing the node and then manually change the menu item created during import to use 'entity:node/9831' then the imported menu is loaded when viewing and editing the node.

drush ev "print_r(Drupal\Core\Url::fromUri('entity:node/9831'))"
Drupal\Core\Url Object
(
    [urlGenerator:protected] => 
    [urlAssembler:protected] => 
    [accessManager:protected] => 
    [routeName:protected] => entity.node.canonical
    [routeParameters:protected] => Array
        (
            [node] => 9831
        )

    [options:protected] => Array
        (
        )

    [external:protected] => 
    [unrouted:protected] => 
    [uri:protected] => 
    [internalPath:protected] => 
    [_serviceIds:protected] => Array
        (
        )

)

Viewing all articles
Browse latest Browse all 293417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>