Closed (outdated)
Project:
Double Field
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2013 at 20:08 UTC
Updated:
23 Mar 2017 at 08:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chi commentedWhich version of the Migrate are you using?
Comment #2
mpv commentedI am using migrate 2.5. I actually had a patch ready, but found a bug when I was about to upload it. Apparently migrate auto loads the .inc files declared in double_field.info, and since those files use simpletest classes you get a fatal error if simpletest is not enabled. #1844462: Class 'DrupalWebTestCase' not found is a similar issue in Location.
I will be working on it today and upload the patch later.
Comment #3
mpv commentedHere's the patch. I removed the
tests/*.incfiles from the .info and included them indouble_field_test_case.inc. The tests still run ok.The migration handler is working for one valued fields, still needs to be tested for multi valued fields.
I have also rolled the patch against 7.x-2.3.
Comment #4
chi commentedIt looks as we do not need to mantain a field handler since 2.6 version of the Migrate.
#1996602: Default field handler
Can you confirm that?
Comment #5
davemybes commentedI'm using Migrate 2.6 and it automatically shows the two fields from double_field. So we shouldn't need a special field handler. The only question now is how would I create additional items of the field when migrating. In my case I have 10 pairs of fields (20 separate fields), that I would like to move into double_field, thereby having a maximum of 10 values for one double_field ... er ... field. I'm using migrate_d2d_ui as well, so I can only associate one pair of fields with the double_field in the UI. Guess I'll need to do something in a prepareRow method. If I figure it out before someone has an answer, I'll report back here.
Comment #6
mpv commentedThanks @incrn8. Since this issue was about adding migrate support to double field and you confirm it's not needed with migrate 2.6 I'm closing it.
Regarding your question, I have never used migrate_d2d_ui so I don't know how you would do that from the ui, but if the source field is an array (you can build that in prepareRow as you suggest) it's imported as a multi-valued field.
Comment #7
mlncn commentedMigrate 2.5 is still the current stable release, and i'm contributing a module that relies on that stable release of Migrate and Double Field.
Would you accept a re-rolled patch? (Needed a little manual intervention to apply now but mpv's patch worked perfectly.)
Comment #8
mlncn commentedWell here's a patch in case you are open to it!
Comment #10
timodwhit commentedIt looks like there is still possibly an issue with migrate and double field at 2.6. I'm getting a lot of notices about "Undefined index: second" and the field is not being recognized as empty.
Using the patch found in #3, I was able to get the migration working and the field is properly recognized as empty.
Comment #11
timodwhit commentedComment #12
timodwhit commentedComment #13
timodwhit commentedSorry, not purposely spamming, just hid the wrong file and now marking as RTBC. My bad
Comment #15
chi commentedCurrent stable version of Migrate module is 2.8. Do we still need this patch? If so can you confirm it would not break migrations made running with Migrate 2.8 module?
Comment #16
chi commented