migrando a drupal desde otro(s) cms guía de supervivencia drupal camp | guatemala 2010
TRANSCRIPT
![Page 1: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/1.jpg)
Migrando a Drupaldesde otro(s) CMS
Guía de supervivencia
Drupal Camp | Guatemala 2010
![Page 2: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/2.jpg)
Drupal Camp | Guatemala 2010
Migrando a Drupal desde otro(s) CMSGuía de supervivencia
Agenda
![Page 3: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/3.jpg)
1. EL problema de la migración.
2. Herramientas Disponibles.
3. Cuando las herramientas fallan!!!.
4. Recomendaciones para las estimar
5. Preguntas.
Drupal Camp | Guatemala 2010
Agenda
![Page 4: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/4.jpg)
Es muy común que encontremos proyectos para migrar un sitio que actualmente funciona con otro CMS (Wordpress, Joomla, Hot Banana, etc) a Drupal.
Lógicamente estos sitios contienen:
• Información
• Estructura ( NO DRUPAL)
• Lenguaje ( NO PHP)
• Base de Datos ( NO MYSQL)
Drupal Camp | Guatemala 2010
1. El problema de la migración.
![Page 5: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/5.jpg)
• http://drupal.org/project/migrate
• http://drupal.org/project/migrate_extras
• http://drupal.org/project/igx_migrate
• http://drupal.org/project/joomla
• http://drupal.org/project/phorum
• http://drupal.org/project/phpbb2drupal
• http://drupal.org/project/wordpress_import
• http://drupal.org/project/phpnuke2drupal
• http://drupal.org/project/wp2drupal
Drupal Camp | Guatemala 2010
2. Herramientas disponibles
Drupal Camp | Guatemala 2010
![Page 6: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/6.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
MySQL Migration Toolkit
![Page 7: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/7.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Crear contenido
Luego de asegurarnos que tenemos la base de datos a migrar, y que sea accesible desde drupal debemos proceder a:
• Crear Content Types
• Crear Vocabularios
• Insertar Nodos
• Asociar nodos a vocabularios
• Generar teasers
• Generar path automaticos
• Crear Vistas
![Page 8: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/8.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Crear contenido
Luego de asegurarnos que tenemos la base de datos a migrar, y que sea accesible desde drupal debemos proceder a:
• Crear Content Types
• Crear Vocabularios
• Insertar Nodos
• Asociar nodos a vocabularios
• Generar teasers
• Generar path automaticos
• Crear Vistas
![Page 9: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/9.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Insertar nodos usando sql scripts
Luego de identificar de donde procede nuestro contenido, debemos ejecutar scripts sql para crear:
• Node Revisions
• Nodes
Es muy importante conservar las relaciones nid en nuestras tablas a razonde que Drupal pueda enconntrar el contenido.
Ademas es recomendable borrar el cache y accesar el contenido recien creado con el usuario admin para evitar problemas de cache
![Page 10: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/10.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Creando Node Revisions
//Insert node revisions
//Set the initial node id
SET @rownum :=20;
INSERT INTO drupal_db.node_revisions(nid,uid,title,body,timestamp,format)
SELECT @rownum := @rownum + 1,21,c.txtTitle,txtBody,UNIX_TIMESTAMP(c.dtAdded),1
FROM tblnavigation n, tblitem i, tblcontent c
WHERE n.intParentID = '537'
AND n.blnDeleted =0
AND n.intID = i.intWebID
AND i.blnDeleted =0
AND i.intID = c.intItemID and c.blnLive=1;
![Page 11: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/11.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Creando Nodes
//Insert nodes
//Set the initial node id
SET @rownum :=20;
INSERT INTO bridalgu_d6db.node(vid,type,uid,status,title,created)
SELECT @rownum := @rownum + 1,'blog',21,1,c.txtTitle,UNIX_TIMESTAMP(c.dtAdded)
FROM tblnavigation n, tblitem i, tblcontent c
WHERE n.intParentID = '537'
AND n.blnDeleted =0
AND n.intID = i.intWebID
AND i.blnDeleted =0
AND i.intID = c.intItemID and c.blnLive=1;
![Page 12: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/12.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Creando Terminos en vocabularios
Se debe hacer un análisis de la base de datos a migrar para por extraer los términos a colocar en nuestros vocabularios de drupal y usar una función para insertarlo en drupal, como se muestra a continuación:
<?php
function insertTerm($vid,$term,$description,$weight){
$sqlIsertTerm="INSERT INTO drupal_db.term_data "; $sqlIsertTerm.="(vid,name,description,weight) ";
$sqlIsertTerm.="values($vid,$term,$description,$weight)";
mysql_query($sqlIsertTerm,$new_db);
?>
![Page 13: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/13.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Creando Terminos en vocabularios
Se debe hacer un análisis de la base de datos a migrar para por extraer los términos a colocar en nuestros vocabularios de drupal y usar una función para insertarlo en drupal, como se muestra a continuación:
<?php
function insertTerm($vid,$term,$description,$weight){
$sqlIsertTerm="INSERT INTO drupal_db.term_data "; $sqlIsertTerm.="(vid,name,description,weight) ";
$sqlIsertTerm.="values($vid,$term,$description,$weight)";
mysql_query($sqlIsertTerm,$new_db);
?>
![Page 14: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/14.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Asociando términos a nodos
Se debe hacer un análisis de la base de datos a migrar saber que terminos se debes asociar a cada nodo y crear una funcion parecida a la que se lista a continuación:
<?php
function insertNodeTerm($vid,$nid,$termid){
$sqlInsert= "insert into drupal_db.term_node (nid,vid,tid) “;
$sqlInsert= "values($nid,$vid,$termid)";
mysql_query($sqlIsert,$new_db);
?>
![Page 15: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/15.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Crear nodos cck via código
Crear nodos content type con campos personalizados puede ser dificil:
![Page 16: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/16.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Problemas después de importar
Teaser:
Problema:
• Después de importas nodos el campo teaser esta vacío o es difícil de calcularlo si tiene HTML.
• Esto causa que las vistan no retornen la información correcta.
Solución:
• Usar el modulo http://drupal.org/project/retease
• Advertencia
• Retease, borrara aquellos teaser que hayas hecho en nodos de forma personalizada
• Borrar los path personalizados y los calculados con pathauto.
• Recomendar hacer esto al inicio del proceso de importación
![Page 17: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/17.jpg)
Drupal Camp | Guatemala 2010
3. Cuando las herramientas fallan!!!
Problemas después de importar
Al importar nodos nuevos, no existirá información extra como la generada por nodewords para el SEO del sitio.
![Page 18: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/18.jpg)
Drupal Camp | Guatemala 2010
4. Recomendaciones para estimar
Las siguientes son recomendaciones para estimar un proyecto de migración
• Definir tiempo para aprender a conocer la estructura de la base de datos desde donde se va a extraer la información > 1 día
• Definir tiempo de procesar la infamación hacia MySQL de ser necesario.
• Calcular cuantos paginas/nodos deben migrarse.
• Se debe calcular cuanto se invierte en migrar 1 pagina/Nodo
• Tiempo en hacer inserción en la base de datos.
• Tiempo en validar que el contenido se haya migrado bien en términos de HTML y CSS
• Verificación del contenido migrado y su funcionamiento con vistas / listados
• Identificar si las paginas/nodes tienen css inline.
• Identificar si las paginas/nodes tienen images inline.
![Page 19: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/19.jpg)
Drupal Camp | Guatemala 2010
4. Recomendaciones para estimar
Las siguientes son recomendaciones para estimar un proyecto de migración
• Definir el numero vistas/listados deben generarse
• Definir cuantos vocabularios y términos deben generarse y asociarse a los términos.
• Definir los tipos de usuario y roles del sitio.
• Definir el numero de usuario a migrar
![Page 20: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/20.jpg)
Drupal Camp | Guatemala 2010
4. Recomendaciones para estimar
Las siguientes son recomendaciones para estimar un proyecto de migración
• Explicar al usuario que migrar, no es restructurar el sitio ( menus, nuevos contenidos, nuevo workflow)
• Explicar al usuario que migrar no es hacer un theme y que todo se vea bien inmediatamente
• Explicar que si no pagan la edición del contenido, eso no entra en la migración
![Page 22: Migrando a Drupal desde otro(s) CMS Guía de supervivencia Drupal Camp | Guatemala 2010](https://reader036.vdocuments.net/reader036/viewer/2022062417/551cf00b5503463f7a8b5357/html5/thumbnails/22.jpg)
Presentation preparada por:Eduardo Garcia
Drupal Camp | Guatemala 2010
©Anexus IT