Submitted by madmatter23 on Sat, 03/17/2012 - 21:00
This installment of the Migrate Classes series will give you a bit of sample code for migrating Content Profile nodes (D6) to Profile2 entities (D7).
Please note that this is not a tutorial for the Migrate module. If you'd like a detailed explanation of the Migrate API, please check either the examples in the Migrate module, or read this excellent blog post on the migrate module.
Here's a bare bones migration class that will query a base node table, join the necessary CCK field table, and migrate them into a Profile2 entity. Please note that you will require the Migrate Extras module to perform this migration.
Submitted by madmatter23 on Sun, 02/26/2012 - 20:33
I've just begun to tackle migrating a site from Drupal 6 to Drupal 7 via V2 of the Migrate module. It's truly an excellent module, but like most things Drupal, it has a steep learning curve. To help offset that slope, I plan to post migration snippets on this blog throughout the next few weeks. The snippets should help to serve as starting points for the many different migration scenarios that you all may encounter. Here is a short list of tentatively planned examples:
Submitted by madmatter23 on Thu, 12/22/2011 - 19:30
As of Drush 4.5, migrating a Drupal site between servers became much easier. The new, little-known drush archive-dump and drush archive-restore commands make it an essentially three step process.
Overview
A basic Drupal site is made of two fundamental elements: the codebase and the database. When you migrate a Drupal site, you need to migrate both of these elements, often with a bit of re-configuration to boot.
The Old Way
Before using Drush to migrate a site, my standard procedure for site migration looked something like this:
Database Migration
Submitted by madmatter23 on Mon, 04/18/2011 - 11:32
Content migration is a pain, particularly when you are charged with copying content from an old html site into a new framework. Often times, old content comes with the baggage of inline css styling, which wreaks havoc on your pretty new site design. Here's a handful of helpful regexs that I use to strip out undeed inline styling, while still preserving the html element structure.
To strip out span tags:
<span[^>]+>
Follow up to strip out the close tags:
</span>
Strip out inline styling:
style="[^"]+"
FYI:[] defines a character class, ^ excludes characters.
I think you get the idea.
Recent comments