S. M. Bjørklund (steinmb) is a Norwegian freelancer and Drupal developer, themer and general site builder. Currently based in lovely Bergen, right at the gateway to the Norwegian fjords.

Drupal talk and drupal beer in Bergen May 11 2017

Stein Magne Bjørklund

Bergen, Norway now have a official meetup group. And we test the waters by giving two talks at our first meetup. I will be talking about Drupal 8 core and media. Where are we now? Helge from Oneiros talks about newest layout methods CSS and modern browsers can provide.

Free of charge sign up at meetup.com.

Change from Drupal 7 media field to file field

Upgraded from Drupal 6 to 7 or have a early Drupal 7 installation and there are a high change that you might still use the legacy Media field. This field used to be the only field that allowed us to use the media widget. It have since been replaced by a standard file/image field, provided by Drupal 7 core. Media also need the third part module, File entity (file_entity - https://www.drupal.org/project/file_entity). This module extends core file entity functionality.

Drupal 8 is out! November 19

Remember remember the 19'th of November.
Drupal is finally here. About 5 years, 3400 developers —it is a game changer

Celebrations happening all over the world - Check out http://celebratedrupal8.com/

Drupalcon Barcelona 2015

Drupalcon Barcelona 2015

That is it. Drupalcon Barcelona 2015 is over. Céad míle fáilte go Baile Átha Cliath. DrupalCon is coming to Dublin in 2016 .

Had a lovely time. No let's get Drupal 8 out the door. First release candidate October 7.

How to migrate content from drupal 6 to 7 by using Migrate_d2d - Part 4 - field mappings

This is probably the last post in this series. I will try in this article to bring it all together. This will also be the most code heavy article. If you are new to migrate and Drupal-to-Drupal data migration, make sure you read and understand the first articles before preceding.

Mapping fields (field mappings)

Migrate have no way of knowing your plans for your Drupal 6 CCK fields or to what fields you are planning to store the data in Drupal 7. Perhaps you do not want or need to migrate all your old data. Source and target field have the same field name and type, but sometime you might want to fix a bad decisions made in the past and reorganize your architecture. Migrate call this field mappings. What ever reason you might have, you will need to share these ideas with Mirate. The basic format is like this:

$this->addFieldMapping('drupal7-field_name', 'drupal6-field_name')

More details are found in the official documentation at drupal.org.

An example of this is found in article.inc:

<?php
$this
->addFieldMapping('field_bar', 'field_foo');
?>

This map field_foo (drupal 6) to the cleverly named field field_bar (drupal 7). This is all it take to get a text field like this migrated if you re-run the node migration drush mi Article.

How to migrate content from drupal 6 to 7 by using Migrate_d2d - Part 4 - nodes

This series would be incomplete without also covering node migration. The example code is working code and should import data from drupal 6 to 7 if you have correctly configured your test setup by following the previously articles (part 1-3). Do not be scared by the code. It is more PHP defining stuff then "real" code containing a lot of logic and stuff.

Pages

Subscribe to S. M. Bjørklund RSS