Problem/Motivation
The link_uri migrate process plugin provided by the core menu_link_content module provides handling for links referencing the special <front>
and <nolink>
routes but does not currently support the special <button>
route added in 8.8 (https://www.drupal.org/node/3053689).
When migrating into menu links url field I receive the following error.
-------------- ------------------- ------- ---------------------------------------------------------------
Source ID(s) Destination ID(s) Level Message
-------------- ------------------- ------- ---------------------------------------------------------------
1 1 The path "internal:/<button>" failed validation.
Steps to reproduce
in my migration_name.yml file I am using the menu_link_content process
process:
bundle: menu_link_content
title: title
menu_name: menu
# Handle external urls or url aliases.
'link/uri':
plugin: link_uri
source: urlpath
In my source migration_name.json file
{
"menu_links": [
{
"link_id": "1",
"parent_link_id": "0",
"menu": "az-resource-menu",
"title": "Resources",
"urlpath": "<button>",
"external": false,
"expanded": true,
"enabled": true,
"weight": "1"
},
Proposed resolution
Add the supported special route to https://git.drupalcode.org/project/drupal/-/blob/9.4.x/core/modules/menu...
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Add the ability to migrate the following menu item types <button>
, <none>
,''
.