Closed (fixed)
Project:
Domain
Version:
7.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2012 at 16:19 UTC
Updated:
4 May 2013 at 10:50 UTC
Jump to comment: Most recent file
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.xComment #4
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 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 commentedOk you are right. I forgot to add the mapping. It's working with your patch. You may commit the fix.
Comment #10
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 ))