Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Coded a Migrate field handler for the 1.2 release of Geofield before realizing there was support for geofield 1.x in migrate_extras.
Patch in comment #1 in case anyone needs it.
Comment | File | Size | Author |
---|---|---|---|
#1 | geofield-migrate-field-handler-2110633-1.patch | 4.05 KB | setvik |
Comments
Comment #1
setvik CreditAttribution: setvik commentedComment #2
eneko1907 CreditAttribution: eneko1907 commentedProblem is the geofield handler proposed here and the existing in migrate_extras for geofield version 1.2 may fail with recent migrate module versions, as the
arguments
array use is deprecated. In fact, we do not need this handler anymore, we can work with geo subfields directly. Problem may be, the geofield handler included in extra will get in your way, may send you in a wild goose chase. disable it (in the admin migration configuration screen admin/content/admin/configure or programmatically )Im other words, you should not do
or variations of the example snippet above. those may fail with the conditions above (geo1.2, migrate 2.4+, migrate_extras)
What works?
Say my sources are in 'lat' and 'long'
in your geo-migration class construct:
and in the function prepareRow of your geo migration class
One more thing - the migration_extras geofield handler will be on your way, as explained.
in case you did install migration_extras (chances are you did), remember you need to disable
the field handler for geo.
Comment #3
eneko1907 CreditAttribution: eneko1907 commentedAlso, I'd suggest the migrate_extras geofield handler is either removed or updated, so we avoid this confusion. in any event, i'm changing the needs review to needs work.
Comment #4
FMB CreditAttribution: FMB commentedComment #5
FMB CreditAttribution: FMB commented