I was just trying to migrate a particular menu from a D6 site into D7. The menu is called "primary-links" (machine name). After struggling to figure out why it was simply *ignored* by migrate_d2d I discovered this little tidbit in d6/menu.inc function prepareRow($row):
// D6 prefixes menus added through the UI with 'menu-'
if ($row->menu_name == 'secondary-links' ||
substr($row->menu_name, 0, 5) === 'menu-') {
return TRUE;
}
else {
return FALSE;
}
I am further confused because in d6/menu_links.inc, I found that there are references to menu links which come from the menu 'primary-links' and are being inserted into the destination menu 'main-menu':
if (!($row->menu_name == 'primary-links' ||
$row->menu_name == 'secondary-links' ||
substr($row->menu_name, 0, 5) == 'menu-')) {
return FALSE;
}
if ($row->menu_name == 'primary-links') {
$row->menu_name = 'main-menu';
}
I understand what is happening now and it makes some sense why this is taking place, but some documentation would be helpful to avoid confusion in the future.
Comments
Comment #1
nerdcore CreditAttribution: nerdcore at OpenConcept Consulting Inc. commentedOthers in the community are equally confused by this functionality:
#2007336: Nearly all menu links ignored