- Issue created by @scrypter
- Status changed to Postponed: needs info
5 months ago 6:22am 15 September 2024 - π©πͺGermany christianadamski Berlin, Germany
I never worked with the D7 version, I started D8+.
But the actual DB structure looks very similar. What exactly did you try, and what was the result?
- π³πΏNew Zealand scrypter
On the source D7 site I have geolocation and geolocation_googlemaps modules enabled.
I was trying drush mim upgrade_d7_field. There are 264 fields and I get 1 fail, "Attempt to create a field storage field_location_map with no type".
"field_location_map" is a D7 geolocation_latlng type field.
On the D10 destination I have enabled geolocation and geolocation_google_maps.
I am wondering if there is migration for this fairly basic situation?
Thanks. - π©πͺGermany christianadamski Berlin, Germany
D8+ the field type is just "geolocation", not "geolocation_latlng". Maybe that's it?
- π³πΏNew Zealand scrypter
Put this in modules/custom/my-migration/src/Plugin/migrate/field/d7/GelocationField.php
namespace Drupal\my_migration\Plugin\migrate\field\d7; use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; /** * @MigrateField( * id = "geolocation", * core = {7}, * type_map = { * "geolocation_latlng" = "geolocation", * }, * source_module = "geolocation", * destination_module = "geolocation" * ) */ class GeolocationField extends FieldPluginBase { ... }
It worked! Hope this might help others. Still wondering if it should be in the contrib /geolocation module?
- π©πͺGermany christianadamski Berlin, Germany
Ah, what exactly? Not too familiar with D7 - D10 migration. What exactly would you put where to enable what?
Happy to commit something, if it might help others.
- π³πΏNew Zealand scrypter
I pinged Damien McKenna and asked him to have a look, it seems both of us don't know the "best practice" solution here?
- π©πͺGermany christianadamski Berlin, Germany
I see a whole bunch of migration D7 files in the geolocation_address sub-module. I do not remember writing those, so they where probably contributed by somebody.
The are aimed to move location_cck fields to address fields through geolocaiton gecoders. So that is not what you want. But maybe still helpful?
What exactly would be the goal here? Just get location_cck field data to geolocation and done?
- πΊπΈUnited States DamienMcKenna NH, USA
I think you should plan out all of the different things that could be migrated, and work through the list one item at a time.