Closed (fixed)
Project:
Drupal-to-Drupal data migration
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Jul 2015 at 19:44 UTC
Updated:
23 May 2017 at 19:35 UTC
Jump to comment: Most recent
Comments
Comment #1
mikeryanIt'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.
Comment #2
dcine commentedOk, 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?
Comment #3
dcine commentedWell, 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`) VALUESFor this:
INSERT INTO `flagging` (`flagging_id`, `fid`, `entity_type`, `entity_id`, `uid`, `timestamp`, `sid`) VALUESDelete 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.
Comment #4
dcine commentedComment #5
hargobindFor anyone looking to migrate Flags, it is already handled by the Migrate Extras module.