Problem/Motivation

When running a migration from D7 to D8, menu links with the <nolink> path do not get migrated.

Steps to reproduce:

  1. On a D7 site, create a menu link in the main menu with the path <nolink>.
  2. Use the Migrate Drupal or Drupal Upgrade modules to migrate the site to D8.
  3. Observe the menu link is not present in the D8 main menu.

Proposed resolution

The attached patch adds special handling for the <nolink> path, similar to the special handling already present for <front>.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bgreco created an issue. See original summary.

bgreco’s picture

bgreco’s picture

Status: Active » Needs review

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

idebr’s picture

The patch in #2 works as expected.

Attached patch adds test coverage.

The last submitted patch, 5: 3067576-5-test-only.patch, failed testing. View results

Lendude’s picture

Status: Needs review » Reviewed & tested by the community

Since the <nolink> support in D7 comes from https://www.drupal.org/project/special_menu_items I'm not sure core needs to provide support for this, but since we do have nolink support in D8 it makes sense to me to add this.

alexpott’s picture

Version: 8.9.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed

It seems fine to support this in core.

Committed and pushed 9506b59dcd to 9.0.x and 988fc09b36 to 8.9.x and a446b8078f to 8.8.x. Thanks!

  • alexpott committed 9506b59 on 9.0.x
    Issue #3067576 by idebr, bgreco, Lendude: <nolink> menu items lost on...

  • alexpott committed 988fc09 on 8.9.x
    Issue #3067576 by idebr, bgreco, Lendude: <nolink> menu items lost on...

  • alexpott committed a446b80 on 8.8.x
    Issue #3067576 by idebr, bgreco, Lendude: <nolink> menu items lost on...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.