info:concrete5:migrationc56toc57

Migration concrete5.6 vers Concrete5.8 (upgrade/update)

https://github.com/concrete5/addon_migration_tool_legacy

Exporter - on obtient un joli fichier XML

https://github.com/concrete5/addon_migration_tool

Importer - vous serez aidé par un GUI assez efficace

https://www.concrete5.org/community/forums/customizing_c5/5.6-to-5.7-migration-now-available/

L'outil marche bien mais il y a quelques erreurs dans le XML généré, voici un petit script bash correctif

#! /usr/bin/bash

###########################################################################
#   Script to debug a c5.6 export.xml prior to import it into c5.8        #
#   Usage: c58migputzxml.sh                                               #
#                                                                         #
#   Copyright information                                                 #
#                                                                         #
#   Copyright (C) 2021-2026 Fred Radeff <fradeff@akademia.ch>             #
#   credits: Thanks O.L.                                                  #
#                                                                         #
#   License                                                               #
#                                                                         #
#   This program is free software; you can redistribute it and/or modify  #
#   it under the terms of the GNU General Public License as published by  #
#   the Free Software Foundation; either version 2 of the License, or     #
#   (at your option) any later version.                                   #
#                                                                         #
#   This program is distributed in the hope that it will be useful,       #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
#   GNU General Public License for more details.                          #
#                                                                         #
#   You should have received a copy of the GNU General Public License     #
#   along with this program. If not, see <http://www.gnu.org/licenses/>.  #
#                                                                         #
###########################################################################

#sed -i 's|<a href="\{CCM:BASE_URL\}([^"]+)/"|<a href="{ccm:export:page:$1}"|g' export.xml
sed -i 's|<block type="remo_expand"|<block type="unige_expand"|g' export.xml
sed -i 's|<data table="btRemoExpand">|<data table="btUnigeExpand">|g' export.xml
sed -i 's|<state><![CDATA[1]]></state>|<isOpened><![CDATA[0]]></isOpened>|g' export.xml
sed -i 's|<state><![CDATA[0]]></state>|<isOpened><![CDATA[1]]></isOpened>|g' export.xml
sed -i 's|<speed><![CDATA[300]]></speed>|<context><![CDATA[default]]></context>|g' export.xml
sed -i 's|<fIDpicture/>|<fIDpicture><![CDATA[0]]></fIDpicture>|g' export.xml
sed -i 's|<fIDthumbnail/>|<fIDthumbnail><![CDATA[0]]></fIDthumbnail>|g' export.xml
sed -i 's|<fIDlogo/>|<fIDlogo><![CDATA[0]]></fIDlogo>|g' export.xml
#any ext urls?
grep '<page name.*pagetype=""' export.xml

L'outil est prévu pour migrer une… 5.5!

Si vous voulez migrer une 5.6 il faut commenter dans l'outil https://github.com/concrete5/addon_migration_tool_legacy

https://github.com/concrete5/addon_migration_tool_legacy/issues/2#issuecomment-183149241

concrete/core/models/page.php, find the export method and comment out these lines:

    $v = View::getInstance();
    $v->disableEditing();
    $v->disableLinks();
    $v->enablePreview();
    ob_start();
    $v->render($this);
    ob_end_clean();
  • info/concrete5/migrationc56toc57.txt
  • Dernière modification: 2021/11/20 08:51
  • de radeff