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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2711101-4-migrate_menu_blocks_not_configurable.patch | 1.59 KB | rocketeerbkw |
| #2 | 2711101-2-migrate_menu_blocks_not_configurable.patch | 443 bytes | rocketeerbkw |
Comments
Comment #2
rocketeerbkw commentedIn 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.ymlit 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.
Comment #4
rocketeerbkw commentedComment #5
quietone commentedComment #6
mikeryanLooks good to me!
Comment #9
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!