After a migration from Drupal 7 to Drupal 8.1.x (also tested in 8.2.x HEAD), I'm unable to configure menu blocks due to the error "The machine-readable name must contain only lowercase letters, numbers, and underscores." The machine of the block is "bartik_menu_menu-get-in-touch" which has dashes instead of underscores.

Comments

rocketeerbkw created an issue. See original summary.

rocketeerbkw’s picture

Status: Active » Needs review
StatusFileSize
new443 bytes

In Drupal 7, menus are created with machine names that have dashes. When the menu module exposes menu blocks, it uses the same machine name (with dashes) for the block delta.

In core/modules/block/migration_templates/d7/d7_block.yml it looks like the block id is a combination of [theme]_[module]_[delta] where [delta] will have dashes.

I added a machine_name process plugin which converted the machine name to "bartik_menu_menu_get_in_touch" and I was able to configure the block.

I can write tests if this is the correct fix.

Status: Needs review » Needs work

The last submitted patch, 2: 2711101-2-migrate_menu_blocks_not_configurable.patch, failed testing.

rocketeerbkw’s picture

Status: Needs work » Needs review
StatusFileSize
new1.59 KB
quietone’s picture

Issue tags: +migrate-d7-d8
mikeryan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

  • catch committed 5dd8636 on 8.2.x
    Issue #2711101 by rocketeerbkw: Migrated menu blocks aren't configurable...

  • catch committed 18732bf on 8.1.x
    Issue #2711101 by rocketeerbkw: Migrated menu blocks aren't configurable...
catch’s picture

Version: 8.2.x-dev » 8.1.x-dev
Priority: Normal » Major
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!

Status: Fixed » Closed (fixed)

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