Migrate address field

I am currently searching for a example to migrate data into an address field in Drupal 8 without any luck for now.

Has someone a hint for me on how to map the fields?

I tried the following:

my.migrate.yml file:

'field_date_address/address_line1': date_tmp_address_address_line1 'field_date_address/locality': date_tmp_address_locality 'field_date_address/postal_code': date_tmp_address_postal_code 

Callback:

$row->setSourceProperty('date_tmp_address_address_line1', 'Teststreet 18'); $row->setSourceProperty('date_tmp_address_locality', 'Test locallity'); $row->setSourceProperty('date_tmp_address_postal_code', '12345'); 

Replay

I was able to solve it :-)

This helped me: https://www.drupal.org/node/2594631#comment-11322879

It is important to map all addressfield subfields, otherwise it will not work.

Category: 8 Time: 2016-07-30 Views: 0
Tags: migration

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.190 (s). 12 q(s)