I'm trying to migrate a web of Drupal 6 to Drupal 7. I have installed the latest versions of Migrate, Migrate D2D, Migrate and Extras and Flags. I tried a thousand options to try to migrate flags of the old site to the new. To do this I created on the new website all flags containers of my Drupal 6 site, but no way.
How I can migrate my flags using the UI that provides Migrate D2D? I have seen and read several tutorials explaining how to do with programming, but i do not know how to do it using the UI module provides (I'm not very good programmer ...).

Can someone help me out? What I have to put on the interface to migrate the flags (please)?

Comments

mikeryan’s picture

Issue tags: -Migrate 2.8

It's simply not practical to build support for every contrib module, or even every popular contrib module, directly into migrate_d2d_ui. What's needed here is the ability to expose the flag fields on the source side so they can be mapped, and that would require some programming to get them plugged in.

dcine’s picture

Ok, thanks!, But as in the settings (configuration) in "Destination handlers" appears the "MigrateNodeFlaggingHandler" class, I thought maybe I could do with the D2D module ...
Could you help me a little more? In the D2D UI, in the node type settings, all flags appear like "Destination field", but not in the "Original field".

What I have to do to get the corresponding flags appear in the original field?
Could you (or someone) help me (Please!)? Any example?

dcine’s picture

Well, in the end I found a solution. In case anyone saw in the same situation, I will try to explain how I got it. It is not very difficult, but not easy:
The first thing to do is look at the "id" of each of our flags. We will use "Phpmyadmin" and compare the table "flag" in Drupal 6 with the "flags" table in our new version in Drupal 7. If they do not match we have to change the "Id" for each flag in our installation of Drupal 7 to match the "ID" corresponding to Drupal 6 (can export the table, change with a text editor the "id" of each flag and re-import the table to match).

Once we get the id matched have to look at the database of our installation in drupal 6. Seek the "flag_content" and "flag_counts" tables and export it. We will change the name to the table "flag_content" and we will put the name of "flagging". Now will export the same tables in our Drupal 7 installation. We will edit with a text editor the tables in your Drupal 6 version and adapt to work in Drupal 7 with reference to the versions that have exported of our version in Drupal 7 (will copy structure Drupal version 7 and attach it in the version of Drupal 6, editing by replacing the previous one).
Now internally change all occurrences of "flag_content" by "flagging" and `fcid` by `flagging_id`in table "flagging" (before "flag_content") and change in both tables references to "content" with "entity" ( `content_id`and `content_type` by `entity_type` and `entity_id`).

Them you have to turn position of `timestamp` for `sid`. See:

You have change this:
INSERT INTO `flag_content` (`fcid`, `fid`, `content_type`, `content_id`, `uid`, `timestamp`, `sid`) VALUES

For this:
INSERT INTO `flagging` (`flagging_id`, `fid`, `entity_type`, `entity_id`, `uid`, `timestamp`, `sid`) VALUES

Delete both tables in our Drupal 7 database installation and import the new tables that have edit and published.

In short you have to get that match the "id" of the flags in both installations and then have to adapt the content of each flag (tables "flag_content" and "flag_counts") to work in Drupal 7.

Now, if all went well and we have made all the necessary changes, we migrated all our flags and everything in it.

I hope this little tutorial can be helpful.

A greeting.

dcine’s picture

Status: Active » Closed (fixed)
hargobind’s picture

For anyone looking to migrate Flags, it is already handled by the Migrate Extras module.