Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

There 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.

agentrickard’s picture

Status: Active » Fixed

And the following adds support for both.

Sorry, no patch. See commit: e21184c..c420be8 7.x-3.x -> 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ayalon’s picture

Category: feature » bug
Status: Closed (fixed) » Active
FileSize
819 bytes

Thanks 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.

agentrickard’s picture

Status: Active » Needs review
FileSize
617 bytes

Actually, 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.

agentrickard’s picture

Ugh. Same $object mistake in the node handler.

agentrickard’s picture

FileSize
1.06 KB

Patch for both functions.

ayalon’s picture

I'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?

ayalon’s picture

Ok you are right. I forgot to add the mapping. It's working with your patch. You may commit the fix.

ayalon’s picture

Status: Needs review » Reviewed & tested by the community
agentrickard’s picture

Right. 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,

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Fixed. Thanks for testing!

dbf450d..1e3bec6  7.x-3.x -> 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

podarok’s picture

Title: Add Migrate module support » Fix Destination Handler registration
Priority: Normal » Critical
Status: Closed (fixed) » Needs review
FileSize
380 bytes

Due to latest migrate module updates here is a patch for proper domain destination handler registration

agentrickard’s picture

Thanks.

agentrickard’s picture

This is not documented in Migrate's API. What branch / release of Migrate is this for?

agentrickard’s picture

Status: Needs review » Reviewed & tested by the community

Well, I see it in both 2.5 and 2.x, so I'll just commit this.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

   11597a9..a5dc128  7.x-3.x -> 7.x-3.x
podarok’s picture

Here is a documentation for that http://drupal.org/node/1824884

agentrickard’s picture

That should also go in the migrate.api.php file, which is where I looked for it.

podarok’s picture

#20
Looks like followup feature request for migrate module )))

agentrickard’s picture

Which I don't have time to file. Going on vacation.

podarok’s picture

opensource poetry ))

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.