Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I tried migrating Users and User Profiles data from a real-world D6 DB using the manifest file on https://drupal.org/node/2224001 and received the following error:
~/Sites/imp $ drush migrate-manifest mysql://imp@localhost/canvas6 manifest.yml
strpos() expects parameter 1 to be string, array given [warning]
MigrationStorageController.php:30
substr() expects parameter 1 to be string, array given [warning]
MigrationStorageController.php:31
substr() expects parameter 1 to be string, array given [warning]
MigrationStorageController.php:34
array_flip(): Can only flip STRING and INTEGER values! [warning]
MigrationStorageController.php:47
array_flip(): Can only flip STRING and INTEGER values! [warning]
ConfigStorageController.php:112
Fatal error: Call to a member function getLoadPlugin() on a non-object in /Users/michael/Sites/imp/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorageController.php on line 73
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to a member function getLoadPlugin() on a non-object in
/Users/michael/Sites/imp/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/MigrationStorageController.php,
line 73
-mike
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff.txt | 757 bytes | chx |
#13 | 2225959_13.patch | 5.02 KB | chx |
Comments
Comment #1
ultimikeComment #2
ultimikeSpoke with Benjy on IRC this morning, he suggests removing
- d6_user_picture_file: false
from the manifest and trying again.Also - to get profile fields, add the following migrations:
-mike
Comment #3
benjy CreditAttribution: benjy commentedI actually meant just remove the
: false
part.Also, as we discussed if you want to bring field data across you'll also need:
- d6_user_profile_field
- d6_user_profile_field_instance
- d6_user_picture_field
- d6_user_picture_field_instance
- d6_profile_values
Comment #4
ultimikeUsing the updated manifest (https://drupal.org/comment/8619757#comment-8619757), I'm getting better results now using a real-world D6 DB...
1. Roles are being migrated.
2. Permissions associated with the migrated roles and enabled D8 modules are being properly set (I didn't go through every single permission, but all the spot checks I did looked good).
3. Profile fields were migrated with the exception of fields of type "url" (link). The source D6 DB has 6 profile fields: 3 urls, 2 text fields, and 1 textarea. Errors reported:
4. I don't see profile categories in D8, I'm assuming they don't exist?
5. Profile data is not being migrated.
6. Usernames, email addresses, status, assigned roles, member since, and last access data appears to be migrated just fine.
7. Received a large number of errors like this (looks like the source query returned a bunch of bogus records?):
8. None of the user pictures migrated over. Received a bunch of errors like this:
and then
It this looking for photos on the source or destination? Should I be copying files over to the destination prior to running the migration?
Thanks,
-mike
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm also having trouble running the d6_user migration. I have tried updating the definition of d6_user so that it does not require profile-related or picture-related items, but the result is the same. I usually get "does not meet requirements". I tried cache-rebuild and also fresh install, same result.
Comment #6
ultimikeI re-ran this using a simplified source database and the most recent imp 8.x codebase.
On the source D6 site:
Started with a fresh site.
Enabled core Profile module.
Created a new "name" (single-line textfield) profile field.
Populated the profile field for the admin (UID=1) user.
On the D8 site:
Started with a fresh site.
Enabled migrate_drupal module.
Used manifest from https://drupal.org/node/2224001#comment-8619757
When I ran the migration via the command line:
I didn't receive any errors on the command line.
The field and settings appeared to have migrated properly.
The value of the "name" profile field was not migrated.
Once we get this case working, I'll go ahead and start adding more user-y type stuff (more users, roles, different types of profile fields).
-mike
Comment #7
MixologicNot sure if this should be a new issue or not, but I wanted to mention a use case that I ran into with user imports that was *really* tricky.
The node_profile module was on the site I was importing, and there was a profile picture image field on the node profile.
Anyhow, it introduced a weird set of chicken/egg scenarios because the user entity I was importing to was a requirement for the file imports.
So perhaps add node_profile with attached files mapping to the user_entity as a potential complex, yet not entirely uncommon use case.
Comment #8
chx CreditAttribution: chx commentedNot sure what's happening but removing a :false can't make a failing migration into a passing one but you can't remove :false here because it's possible there are 0 users with pictures.
Comment #9
chx CreditAttribution: chx commentedHaving a DB dump would make it easier to debug this. In fact, if you can make a dump based on the dump database script (I usually use the script shipped with D7 and add an if ($table != 'mytable') continue to the loop to only dump a single table) then you can even make a failing test case. From there the fix is easy.
Comment #10
ultimikeIt looks like that when "signature support" is disabled on the D6 site, then the "signature_format" of users is set to zero. This causes the D6->D8 migration to fail.
I went ahead and updated the Drupal6User.php dump with a new user record that has a signature_format of 0. Patch attached.
-mike
Comment #11
ultimikeMade some additional progress on this. I added the static_map and skip_process_on_empty process plugins to the signature_format field in d6_user.yml and got our new test to pass.
The addition of the plugins sets the signature_format value to NULL in D8 when the D6 source value is 0.
There's still an issue though, as with my simple D6 real-ish DB test case, profile values aren't being migrated. Looking into that next...
Thanks,
-mike
Comment #12
ultimikeMy profile value issue was related to my test manifest (see https://drupal.org/node/2224001#comment-8751825), not any code issue. I think the patch in 11 is ready for review.
Thanks,
-mike
Comment #13
chx CreditAttribution: chx commentedGood to go , very good to go! I added a little comments, thanks much.
Comment #14
webchickNice catch!
Committed and pushed to 8.x. Thanks!