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.
Add a migration handler to ease use of Migrate data. http://drupal.org/project/migrate
Comment | File | Size | Author |
---|---|---|---|
#14 | 1702856-handler-registration.patch | 380 bytes | podarok |
#7 | 1702856-user-migrate.patch | 1.06 KB | agentrickard |
#5 | 1702856-user-migrate.patch | 617 bytes | agentrickard |
#4 | domain-migrate-1702856.patch | 819 bytes | ayalon |
Comments
Comment #1
agentrickardThere are actually two items here:
1) Support the domain_site, domains and domain_source properties on a node.
2) Support domains as a migration destination.
Of these, #1 is more vital.
Comment #2
agentrickardAnd the following adds support for both.
Sorry, no patch. See commit:
e21184c..c420be8 7.x-3.x -> 7.x-3.x
Comment #4
ayalon CreditAttribution: ayalon commentedThanks for adding migrate support!
I used it to migrate some users to drupal. There is a bad bug (probably because of variable renaming), that prevents the import od user domains.
Attached you find a patch to fix this error.
Comment #5
agentrickardActually, you should _not_ be reading $row here. Reading the $row is only used in custom migrations when data is missing. However, we're using $object when we should be using $user, so the attached corrects that.
Please test.
In future, please open a new issue. And set issues to "needs review" when you upload a patch.
Comment #6
agentrickardUgh. Same $object mistake in the node handler.
Comment #7
agentrickardPatch for both functions.
Comment #8
ayalon CreditAttribution: ayalon commentedI'm migrating date from drupal 6 to drupal 7. The problem is, that drupal 7 changed the domain_id 0 to a different value.
While migrating, I have to remap the domain_id in the migrate prepareRow() function. The prepared value is then added to the current row.
If I use your patch, I cannot map any data to the variable $user->domain_user.
Are you sure, this is the correct way of doing that?
Comment #9
ayalon CreditAttribution: ayalon commentedOk you are right. I forgot to add the mapping. It's working with your patch. You may commit the fix.
Comment #10
ayalon CreditAttribution: ayalon commentedComment #11
agentrickardRight. This handler is set up for the default case. Any changes you have to make to the inbound data -- e.g. if the domain_id you use doesn't match a numeric id or machine name -- goes in your migration's prepareRow() method.
This error was a copy paste from some custom code where I used $object instead of $user/$node in the method,
Comment #12
agentrickardFixed. Thanks for testing!
Comment #14
podarokDue to latest migrate module updates here is a patch for proper domain destination handler registration
Comment #15
agentrickardThanks.
Comment #16
agentrickardThis is not documented in Migrate's API. What branch / release of Migrate is this for?
Comment #17
agentrickardWell, I see it in both 2.5 and 2.x, so I'll just commit this.
Comment #18
agentrickardCommitted.
Comment #19
podarokHere is a documentation for that http://drupal.org/node/1824884
Comment #20
agentrickardThat should also go in the migrate.api.php file, which is where I looked for it.
Comment #21
podarok#20
Looks like followup feature request for migrate module )))
Comment #22
agentrickardWhich I don't have time to file. Going on vacation.
Comment #23
podarokopensource poetry ))