Reasons:
* Migrate module is much superior than OG's own migrate implementation.
* Migrate module might be in D8 core

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

Some work has been committed to 1686394 branch. So not working!

gdl’s picture

Attached is a Migrate destination class for OG membership entities, cribbed almost entirely from the node destination class. It's been working quite well for me, but I'm sure there are issues. The error handling could probably be better, for example, and there's a @fixme or two in there. Hopefully it'll be of some use!

Thanks for Organic Groups!
-G

amitaibu’s picture

Issue tags: +migrate

tagging

Nephele’s picture

Admittedly, I don't have any experience with the Migrate module. But glancing over the project description, it looks like the primary intent of the module is to import data from non-drupal sites into drupal.

What looks more relevant to og_migrate is migrate_d2d (the Drupal-to-Drupal migrate module). That's the project brought up in the D8 core discussion at #1052692: New import API for major version upgrades (was migrate module). However, migrate_d2d only exists in a sandbox version, and it emphasizes that its API is still in flux. Plus, There's no guarantee that migrate_d2d will even have a D7 version, especially if the top priority is getting a product ready for D8.

So it seems to me like any work on replacing og_migrate should wait until migrate_d2d is more stable, and might even be better for D8 than D7.

amitaibu’s picture

it looks like the primary intent of the module is to import data from non-drupal sites into drupal

Migrate is pretty robust, and I believe it can help us. For example have a look at origin/1686394 on og/includes/migrate/7200/og_7200_roles.migrate.inc (untested, but that the idea).

amitaibu’s picture

Sorry, didn't push correctly, will do later on.

My mistake, everything was pushed correctly.

amitaibu’s picture

Assigned: Unassigned » amitaibu
Status: Active » Needs work
FileSize
2.11 MB

Work in progress, but good progress :)

Now working on tests.

Nephele’s picture

Using the head of the 1686394 branch, I'm getting the following error message every time I view the admin/content/migrate page:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7.d6_og_uid' doesn't exist

However, I seem to be able to ignore the message and proceed to do an import. (This is when migrating a database from og-1.4 to og-2)

Also, it would be good to update the link in the message: "Organic groups or one of its modules needs to migrate data. Organic groups may not work properly without it. After a successful execution you can disable it." The link needs to be changed to point to admin/content/migrate instead of admin/config/group/group-migrate. And perhaps also tweak the message to give some information about what to do on the migrate page. I assumed that I had to select the "Update" checkbox in the Options section and then execute an "Import", but I'm not sure whether that's correct.

amitaibu’s picture

Status: Needs work » Needs review
FileSize
2.13 MB

All tests are passing locally (needs review for testbost)

Need to update OG-UI and OGUR migrtion plugins.

Status: Needs review » Needs work

The last submitted patch, 1686394-og-migrate-9.patch, failed testing.

amitaibu’s picture

Note All Migrate plugins are now suposed to work (branch 1686394).

amitaibu’s picture

Status: Needs work » Fixed

Apart of the OGUR migrations, all is migrated and tested. Please open new issues for follow-ups.
Note that unfortunately the testbot doesn't execute the tests that have 'dependencies' => array('migrate'), -- those need to be executed locally.

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