Working with eliza411 and a fresh clone of the sandbox, it looks like there is an issue when migrating multiple (non-custom) block.
My manifest is running the following migrations:
# blocks
- d6_block
- d6_menuWe're migrating from a D6 site with multiple (non-custom) blocks (SQL dump attached).
When we run the migration, we get an "integrity constraint violation" (duplicate key) on the "info" field of the "custom_block" table.
Looking at the source "blocks" table, none of the non-custom blocks have populated "title" fields. It looks like the "title" field is mapped to the D8 "custom_blocks" "info" field. The "info" field is keyed, so it looks like the first block is migrated fine, but then all successive blocks hit the same "duplicate key" error.
Looking at the MigrateBlockTest.php, it appears that this test is only checking the migration of a single block. Would it make sense to modify this test to check the migration of multiple blocks?
Thanks,
-mike
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | custom_blocks-2214229-5.patch | 481 bytes | ultimike |
| #3 | source.sql_.zip | 127.17 KB | ultimike |
Comments
Comment #1
eliza411 commentedComment #2
eliza411 commentedComment #3
ultimikeComment #4
ultimikeI just retested this on an up-to-date version of the 8.x imp branch, and it is still an issue.
I created a new D6 site, added 2 custom blocks, neither with a block title, and attempted to run the migration. The result was the same.
-mike
Comment #5
ultimikeI dug down into this issue a bit and I think the issue can be solved by adding a d6_custom_block as a soft-dependency to d6_block (ridiculously simple patch attached).
Now, when I run the following manifest:
I get no errors and my custom blocks a migrated to the D8 site.
They are not, however placed in the proper regions. I half-expected that if I have a block in the D6 (Garland) "Header" region that it would automatically be placed in the D8 (Bartik) "Header" region as well. The same goes for the "Footer" region.
-mike
Comment #6
benjy commentedMoving this into the core issue queue since the D6 migrations are now in core. Setting to NW since I believe ultimike is working on mapping the block regions.
Comment #7
ultimikeDuplicate of https://drupal.org/node/2248407