I have only been work with Migrate Plus for a couple of weeks: Migrating content from a SharePoint site via the Source CSV plugin, in Acquia Desktop environment. Can import text fields (title, body ...) reliably but having to experiment a lot to do others (relations, dates ...). Problem is when I get something wrong in yml configuration, import fails:
- After modifying the yml and trying another import, the failed records are not tried again (with no errors).
- Tried a roll back and getting errors: "array_flip(): Can only flip STRING and INTEGER values! EntityStorageBase.php:227 ", one for each failed record I think.
- I am using --limit='2 Items'. If I try more records, the additional records are attempted, but not the failed 2.

Sounded to me like Plus was not cleaning up after the failures, so I looked at the migrate_map... record in MySQL and attached an image. I don't know how the mapping works but the null destination ids are suspicious.

Is there a low risk way I can recover this? I can't find a way to reset or delete the migration.

Any help will be greatly appreciated.

bob

CommentFileSizeAuthor
migrate_map1.PNG31.88 KBbmick@arcweb.com
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bmick created an issue. See original summary.

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

What Drupal core version are you on? The rollback bug was fixed in August: #2579343: Migrate rollback does not rollback failed items

bmick@arcweb.com’s picture

I am using "Lightning 8.x-1.00-rc7".
I looked but did not see the issue and fix. I apologize.
I'll have learn how to update my environment.

Thanks for your quick response,

bob

leisurman’s picture

Hello BMike

I have the same task as you. Migrate a SharePoint site to Drupal 8. Did you have issues getting a clean CSV or XLS file from Sharepoint. My coworker tells me its hard to export content and body sections from SharePoint. If you managed to get the body section out was the format raw html or plain text. I am worried that it will be plain text then we have to manually add html tags like

and

in once its in Drupal.
Could you please email a zip file of the plugins/modules you created to do your migrate?
I just learned how to use Migrate CSV and I have created a yaml file to use the import single feature and pull in ---nid,title,body, custom cck fields from a mock CSV file. I am now learning how to pull in and alter different date formats (I saw your question and post about this), then I will learn how to pull in taxonomy terms. I also want to learn how to create my own migrate module since I am only using the import single feature and pasting in my yaml file every time I run -- drush mi mytest.
Good luck to you on your project!
Thank you,
Paul

bmick@arcweb.com’s picture

I apologize for my late response: I wrote a win desktop app in C#, using the SharePoint SDK to extract, transform and store content into a CSV file. Initially I was asked to just to that. But I had to pick up the migrate dev as well. As I learned D8 migrate/plus ... I needed to tweek the app, and I can repeat it as often as I like to catch new content on the source, and deal with changes on the D8 site. I didn't create a migrate module. A few notes:
- The order of migrations is very important because migrate keeps mapping tables that you can use on subsequent migrations. Our site builders built taxonomies manually, forcing me to manually map all taxonomies. Not difficult but tedious.
- Our taxonomies changed and I used static map process plugin to correct them.
- In general our plain text migrated to plain text and html to html. I stripped a lot of the html tags to those acceptable to ckEdit.
- The biggest challenge was dealing with embedded links to files, images, and pages. I had to develop a mapping scheme to pull this off (as best I could).

mikeryan’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)