Making the Move from Typo3 to Drupal
-
Upload
acquia -
Category
Technology
-
view
3.681 -
download
3
description
Transcript of Making the Move from Typo3 to Drupal
![Page 1: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/1.jpg)
Making the Move from TYPO3 to Drupal
Bryan House!VP Marketing!Acquia!
December 8th, 2011!
Ankur Gupta!CTO & Chief Architect!Srijan Technologies!
Ritesh Gurung !Team Lead !Srijan Technologies!
Ishan Mahajan !Migration Lead!Srijan Technologies!
![Page 2: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/2.jpg)
Making the move from TYPO3 to Drupal
![Page 3: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/3.jpg)
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
![Page 4: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/4.jpg)
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 MNN.com
• Carried out migration projects from D5 to D7, CakePHP to D7, TYPO3 to OpenPublish/D7
![Page 5: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/5.jpg)
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 don't necessarily adhere to the core model.
• Documentation is scarce.
• Enterprise support through Acquia.
![Page 6: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/6.jpg)
Where do we see Typo3 standout?
• Hierarchical representation Page structure
• Flexibility in controlling access to content
• Internationalization
• Templating
• Backend for website administration
![Page 7: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/7.jpg)
Work
• knr.gl – migration to OpenPublish
• eastwestcenter.org (primary partner - Forum One Communications)
• TYPO3_migrate module
![Page 8: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/8.jpg)
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?
![Page 9: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/9.jpg)
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
![Page 10: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/10.jpg)
TYPO3_Migrate module
Migrating 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.
![Page 11: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/11.jpg)
Using the TYPO3_migrate and migrate modules
![Page 12: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/12.jpg)
Configure
![Page 13: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/13.jpg)
Migrate Dashboard
![Page 14: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/14.jpg)
If you prefer the command line
drush migrate-status
![Page 15: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/15.jpg)
If you prefer the command line..
![Page 16: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/16.jpg)
![Page 17: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/17.jpg)
Migrating users
![Page 18: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/18.jpg)
Users Mapping
![Page 19: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/19.jpg)
Running the migration
![Page 20: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/20.jpg)
Running the migration ...
![Page 21: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/21.jpg)
![Page 22: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/22.jpg)
Migrating tt_news content - typo3_news module
• Taxonomy - News Category
• Content type - News
![Page 23: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/23.jpg)
News categories
![Page 24: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/24.jpg)
![Page 25: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/25.jpg)
Running the migration
![Page 26: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/26.jpg)
Migrated Categories
![Page 27: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/27.jpg)
News articles
![Page 28: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/28.jpg)
News Mapping
![Page 29: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/29.jpg)
![Page 30: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/30.jpg)
drush migrate-import Typo3News
![Page 31: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/31.jpg)
![Page 32: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/32.jpg)
![Page 33: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/33.jpg)
Incremental Migration
• Highwater mark field.
• Schedule(via cron) regular updates.
![Page 34: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/34.jpg)
Steps for defining migration
![Page 35: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/35.jpg)
![Page 36: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/36.jpg)
Lets have a look at the code
![Page 37: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/37.jpg)
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,
• );
• }
![Page 38: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/38.jpg)
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.
![Page 39: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/39.jpg)
Step 2(contd)
class Typo3NewsMigration extends Migration {
public function __construct() {
parent::__construct();
...
}
public function prepare(stdClass $node, stdClass $row) {
...
}
}
![Page 40: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/40.jpg)
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.
![Page 41: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/41.jpg)
Step 2a: Give Description
• Class description
o $this->description = t('News migration from TYPO3'); • Dependencies
o $this->dependencies = array('Typo3NewsCategory'); ...
![Page 42: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/42.jpg)
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');
$query->addExpression('GROUP_CONCAT(newscat.title)', 'newstags');
![Page 43: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/43.jpg)
![Page 44: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/44.jpg)
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');
![Page 45: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/45.jpg)
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');
![Page 46: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/46.jpg)
![Page 47: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/47.jpg)
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);
}
![Page 48: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/48.jpg)
Migrate Example
![Page 49: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/49.jpg)
Resources
Download and install the modules
• http://drupal.org/project/migrate
• http://drupal.org/project/TYPO3_migrate
![Page 50: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/50.jpg)
Acquia is Hiring!
• Do you love working with Drupal?!
• Acquia is hiring in North America and Europe!- Engineering!- Design!- Client Advisors!- Inside Sales!
http://acquia.com/careers!
![Page 51: Making the Move from Typo3 to Drupal](https://reader034.fdocuments.in/reader034/viewer/2022052523/5552f20cb4c90584028b4b89/html5/thumbnails/51.jpg)
Questions!
• For more information visit: http://www.acquia.com!• Follow us: http://www.twitter.com/acquia!• Contact us: [email protected] or 888.9.ACQUIA!
• Contact Srijan Technologies: Rahul Dewan, [email protected]!
Todayʼs webinar recording will be posted to:!
http://acquia.com/resources/recorded_webinars!