Problem/Motivation

Upgrading a Drupal 7 site to Drupal 8 should automatically convert data from the Location field to work with the Address module.

Proposed resolution

Provide the necessary plugins to automatically convert Location fields from Drupal 7 to the Address module in Drupal 8.

Remaining tasks

  • Build the necessary plugins to migrate Location fields.
  • Add examples to the process plugin description.
  • Provide test coverage.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Issue fork address-3173870

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue summary: View changes
huzooka’s picture

Assigned: Unassigned » huzooka
huzooka’s picture

Assigned: huzooka » Unassigned
Status: Active » Needs work
Issue tags: +Needs tests
StatusFileSize
new7.75 KB
huzooka’s picture

huzooka’s picture

Component: User interface » Code
lunk rat’s picture

How do you use this patch to import nodes, mapping D7 location data to D8 address fields? Can anyone hint with example migration yml?

matroskeen’s picture

Issue summary: View changes

I applied and tested patch #5 - it works like a charm! Thanks for that 🙌

Can anyone hint with example migration yml?

field_destination_address:
  plugin: location_to_address
  source: field_source_location

Assuming you have field_source_location location field in the source and field_destination_address address field in the destination site.

We will also need to add an example to the plugin description, similar to Drupal\link\Plugin\migrate\process\FieldLink. (added it to the remaining items)

wim leers’s picture

@Matroskeen: yay, thanks for confirming!

huzooka’s picture

Since Location's data structure is very complex, we decided to create a standalone module called Location Migration. I accidentally forgot to mention it here.

matroskeen’s picture

Thanks for letting me know. It made me check the source columns more carefully...

Turns out I also have geodata in the source, so I wanted to go with the module instead. However, I noticed it has a dependency on geolocation, but in my project, the destination will be geofield.

So I'll probably go with an extra process plugin similar to Drupal\location_migration\Plugin\migrate\process\LocationToGeolocation .

Anyway, thanks for the great work!

P.S. I'll try to circle back and create a task in the module to remove the dependency on geolocation :)

mparker17’s picture

Now that #3189605: Declare upgrade status from D6, D7 has been committed; here's the patch from #5 with the upgrade status set properly.

Liam Morland made their first commit to this issue’s fork.

liam morland’s picture

Created a merge request with the pach in #12.

liam morland’s picture

Status: Needs work » Needs review