Making the Move from Typo3 to Drupal
Upcoming SlideShare
Loading in...5

Making the Move from Typo3 to Drupal



To view this presentation, visit

To view this presentation, visit



Total Views
Views on SlideShare
Embed Views



2 Embeds 38 37 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Excellent guide! Thanks!

    I can share a tip for content migration: found an online converter CMS2CMS, and it claims to be moving textual content, images, users, internal links etc from TYPO3 to Drupal.

    But templates and extensions don't get moved...
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Making the Move from Typo3 to Drupal Making the Move from Typo3 to Drupal Presentation Transcript

  • Making the Move fromTYPO3 to DrupalIshan Mahajan ! Ankur Gupta!Migration Lead! CTO & Chief Architect!Srijan Technologies! Srijan Technologies!Bryan House! Ritesh Gurung !VP Marketing! Team Lead !Acquia! Srijan Technologies!December 8th, 2011!
  • Making the move from TYPO3 to Drupal
  • Presenters>> Ishan Mahajan : Lead on migration projects from TYPO3 to Drupal>> Ankur Gupta : CTO and Chief Architect>> Ritesh Gurung : Team Lead for Drupal projects; TYPO3 expert
  • Srijan Background•  Formed 2002•  Worked with TYPO3 from 2004-2009•  Drupal portfolio started increasing from 2008 onwards•  Boutique Drupal shop now; dropped Django, TYPO3, Rails consulting services in July 2010•  ~ 40 people across 2 offices; Delhi region and Dharamshala•  Built high-traffic portals like•  Carried out migration projects from D5 to D7, CakePHP to D7, TYPO3 to OpenPublish/D7
  • Why were clients looking to migrate•  Not a large TYPO3 developer community as compared to Drupal. Specially in the US•  Expensive and slow maintenance/upgrade process.•  Difficult to implement community oriented features.•  Adding new functionality in Drupal is relatively easier and quicker.•  Consolidation of all extensions into a single system - TYPO3 custom scripts dont necessarily adhere to the core model.•  Documentation is scarce.•  Enterprise support through Acquia.
  • Where do we see Typo3 standout?•  Hierarchical representation Page structure•  Flexibility in controlling access to content•  Internationalization•  Templating•  Backend for website administration
  • Work• – migration to OpenPublish• (primary partner - Forum One Communications)•  TYPO3_migrate module
  • Concerns we heard•  What all content can be migrated?•  Can all digital assets be migrated?•  Can the user information and the relationships with galleries, pages, blogs etc be maintained?•  Comments on articles and images?•  Can categories be migrated?•  Incremental migration be done?•  How much downtime?
  • Migrate module•  Provides a flexible framework for migrating content into Drupal.•  It is built for Drupal.•  Supports core Drupal objects such as nodes, users, taxonomy terms and comments.•  Supports migration from XML, JSON, CSV, Databases•  Incremental migrations•  Drush commands for import, listing, status, rollback etc•  Migrate UI module
  • TYPO3_Migrate moduleMigrating content from a TYPO3 website to Drupal using the Migrate module:•  Users(both frontend and backend).•  Standard typo3 pages along with their tt_content elements.•  News(tt_news) and news categories.
  • Using the TYPO3_migrate and migrate modules
  • Configure
  • Migrate Dashboard
  • If you prefer the command linedrush migrate-status
  • If you prefer the command line..
  • Migrating users
  • Users Mapping
  • Running the migration
  • Running the migration ...
  • Migrating tt_news content - typo3_news module•  Taxonomy - News Category•  Content type - News
  • News categories
  • Running the migration
  • Migrated Categories
  • News articles
  • News Mapping
  • drush migrate-import Typo3News
  • Incremental Migration•  Highwater mark field.•  Schedule(via cron) regular updates.
  • Steps for defining migration
  • Lets have a look at the code
  • Step 1: implement hook•  Define your own module and let the migrate module know about it.•  Implement hook_migrate_api•  function mymodule_migrate_api() {•  return array(•  api => 2,•  );•  }
  • Step 2: define migration class•  Give description.•  Let migrate know about the source of your content.•  Let migrate know about the destination type.•  Map the source and destination fields.•  Massage the data before being migrated.
  • Step 2(contd)class Typo3NewsMigration extends Migration { public function __construct() { parent::__construct(); ... } public function prepare(stdClass $node, stdClass $row) { ... }}
  • Functions•  public function __construct() {..} o  Define the destination type(node, user, comment etc) o  Describe the source(databse, xml etc.) o  Field mappings•  (optional) public function prepare(stdClass $node, stdClass $row) {..} o  Massage the data that was pulled in – clean up text, links etc.
  • Step 2a: Give Description •  Class description o  $this->description = t(News migration from TYPO3); •  Dependencies o  $this->dependencies = array(Typo3NewsCategory);...
  • Step 2b: Setup source query$query = db_select(TYPO3_DATABASE_NAME . .tt_news, tn) ->fields(tn, array(uid, crdate, tstamp, pid, title, hidden, short, bodytext, author, author_email, image, imagecaption, links, ext_url, news_files)) ->fields(catmm, array(sorting, uid_foreign)); $query->condition(tn.deleted, 0); $query->leftJoin( TYPO3_DATABASE_NAME . .tt_news_cat_mm, catmm, catmm.uid_local = tn.uid); $query->leftJoin( TYPO3_DATABASE_NAME . .tt_news_cat, newscat, newscat.uid = catmm.uid_foreign); // Related news articles $query->leftJoin(TYPO3_DATABASE_NAME . .tt_news_related_mm, relatedmm, relatedmm.uid_local = tn.uid); $query->orderBy(tn.tstamp, ASC); $query->groupBy(tn.uid);
  • Step 2c: Map the Data•  Let the migrate module know the type of source o  $this->source = new MigrateSourceSQL($query);•  Similarly provide the destination handler o  $this->destination = new MigrateDestinationNode(news);
  • Step 2d: Map the fields•  Field mappings take the form: o  $this->addFieldMapping(‘destination_field_name’, ‘source_field_name’);•  Can define default values o  $this->addFieldMapping(language) ->defaultValue(en);
  • Step 3:Massage the data•  On its way to Drupal! public function prepare(stdClass $node, stdClass $row){ $node->status = ($row->hidden) ? 0 : 1; $node->body = $this->processLinkTag($node->body); }
  • Migrate Example
  • ResourcesDownload and install the modules••
  • Acquia is Hiring!•  Do you love working with Drupal?!•  Acquia is hiring in North America and Europe! - Engineering! - Design! - Client Advisors! - Inside Sales!!
  • Questions!•  For more information visit:!•  Follow us:!•  Contact us: or 888.9.ACQUIA!•  Contact Srijan Technologies: Rahul Dewan,! Todayʼs webinar recording will be posted to:!!