Upgrade auf TYPO3 6.2 Jochen Weiland ! ! TYPO3camp München 2014 Fakten • Kunden lieben LTS Versionen • Die meisten Projekte laufen mit 4.5 Fakten • 3.5 Jahre seit dem Release 4.5 • 34 Release seitdem Fakten • 5 Major Releases: 4.5 4.6 4.7 6.0 6.1 Jedes mit vielen neuen Features! 6.2 Dank an Patrick Lobacher (der alle Änderungen dokumentiert) 550+ Seiten Änderungen http://typo3.org/download/release-notes/whats-new/ www.lobacher.de Fakten • 500.000+ Web Seiten mit TYPO3 • weniger als 200 Tage zum Updaten! • ~ 2.500 Updates pro Werktag! Fakten • ~ 1.000 TYPO3 Agenturen • ~ 500 Upgrades für jede Agentur • ~ 3 Upgrades pro Tag Upgrade Vorbereiten Wichtig • Niemals ein Update direkt auf der LiveSeite • Upgrade immer auf einer Kopie vornehmen • Backup vorhanden? Wirklich? Eure Wahl: • Installation aufräumen, dann Kopie erstellen • schneller, aber Änderungen an LiveSeite • Kopie erstellen, dann Aufräumen • sicherer, aber langsamer Clean-up first: smaller database and project to copy, but you make changes in live system ! Copy-first: you are on the safe side, but copying takes longer Kopie Erstellen • Komplette Dateistruktur des Projekts kopieren Kopie der Datenbank • Neue, leere Datenbank erstellen • Collation: utf8_general_ci • Datenbank duplizieren: mysqldump --opt -u user1 -ppassword1 olddatabase | mysql -u user2 -ppassword2 newdatabase in typo3conf: ! ../../tools/mysqldump --opt -u root -psecret muster-45 | ../../tools/mysql -u root -psecret muster-t3dd14 ! if database host is NOT 127.0.0.1, you need to specify host with -h host Kopie Fertigstellen • Neue Domain (VHost) erstellen und Domain-Records anpassen • localconf.php (oder Install Tool): Zugangsdaten Datenbank anpassen • TypoScript: baseURL anpassen Installation Aufräumen • Lokale, nicht installierte Extensions entfernen Installierte, nicht benötigte Extensions deinstallieren Tipp: Extension „Additional Reports“ in our example we removed: lorem_ipsum, veguestbook, timtab, adminpanel, sbaccessiblecontent, lib, div Ext: additional_reports when you try to delete an extension, the number of records in the database will be shown Obsolete Extensions • Funktioniert vielleicht in 6.2, aber Logfiles werden nicht mehr erstellt Installation Aufräumen ! • Database Analyzer im Install Tool • Update Required Tables • Remove unused tables Remove unused Tables Datenbank Verkleinern • Tabellen leeren: • cache_ … • cachingframework_ … • cf_ … • sys_log, sys_stat, … • tx_realurl_errorlog, … SQL statement TRUNCATE will empty a table, DROP will delete a table For other tables: use phpmyadmin ! For very large tables: delete (drop) table and re-create via install tool (compare table structure) Extensions in 4.5 Aktualisieren Extension Versionen (4.5) Warnungen beim Upgrade Warnung PHP Version Extensions mit Update Skript Deprecation Log Namespacing typo3/sysext/core/Migrations/Code für IDE: PHP Version Prüfen • TYPO3 4.5, 4.6 arbeiten PHP 5.2-5.5 • TYPO3 4.7 und höher benötigen PHP 5.3-5.5 some old extensions my not be compatible with PHP 5.3+ ! update realurl Extension Error Display Einschalten Check ExplicitAllow/Deny Important: if setting in field explicitADmode is empty, you need to change it to explicitDeny ! in TYPO3 6.2, default is explicitAllow Referenz Index Make sure that all internal Database references are up-to-date ! Using shell: make sure that path to php-cli version is correct ! Make sure that user _cli_lowlevel exists Referenz Index Smooth Migration • Erweiterungen extbase und fluid müssen installiert sein • Extension smoothmigration installieren • BE User _cli_smoothmigration anlegen • Backend neu laden smoothmigration extension can be used in TYPO3 4.5-4.7, after upgrading to 6.2 you can uninstall it Smooth Migration Smooth Migration Übersicht Run the checks first, then switch to „Report“. Note that the spinner during „Check“ will never stop, so just start the „Check“ process, wait a minute or so and then look up the „Report“ Datenbank utf-8 In most cases you can’t change the MySQL server setting yourself, you need to make sure to use the forceCharset and setDBinit settings in the Install Tool correctly (see next slide) Database utf-8 Important: if you change these settings, you may end up with unpredictable results in your database. It may be necessary to convert the database to UTF-8 format! phpmyadmin require_once changed in cron_printlink (pi1, pi2) and sr_language_menu (pi1) ! other occurrences will be fixed after updating extensions Symlink Aktualisieren • Auf neue TYPO3 Version ändern: typo3_src -> typo3_src-6.2.x Updating index.php only necessary if not symlinked ! Install Tool Aufrufen if from BE „no input file specified“: use URL project/typo3/install instead ! if connection to DB fails with IP 127.0.0.1, use localhost instead ! Note: on jweiland.net Hosting Packages the DB server is at 127.0.0.3 ! After Uninstalling Upgrade Wizard Datenbank Prüfen Don’t remove/rename fields yet, only add/modify if necessary Cache Leeren Admin User TSconfig • options.clearCache.system = 1 Extensions Aktualisieren Version nicht unterstützt? ext_emconf.php Nicht im TER? GIT Probieren! • git.typo3.org • Repository from author, e.g. github.com/jweiland-net/ rlmp_tmplselector Extension von git • in typo3conf/ext: git clone https://github.com/jweilandnet/rlmp_tmplselector sr_language_menu: Plugin neu konfigurieren, Static modules: static_info_tables und sr_language_menu neu einfügen ! DefaultISOlanguage in TS setzen: plugin.tx_srlanguagemenu.settings.defaultLanguageISOCode = DE Änderungen TypoScript file.treatIdAsReference = 1 DAM to FAL Migration • Schauen wir uns mal an, wie Dateien behandelt werden TYPO3 4.x uploads/media uploads/pics uploads/ direct upload RTE upload local file rendered images typo3temp/… content element upload through element browser fileadmin/…. BROWSER RTE linked files TYPO3 6.x - FAL rendered images direct upload fileadmin/ user_upload fileadmin/_processed_ local file upload through element browser RTE upload fileadmin/…. BROWSER TYPO3 4.x DAM upload in backend local file fileadmin/… uploads/media uploads/pics uploads/ FTP Upload local file index and meta-extraction tx_dam/…. tx_dam_categories use in content TYPO3 4.x DAM upload in backend local file fileadmin/… uploads/media uploads/pics uploads/ FTP Upload local file index and meta-extraction tx_dam tx_dam_categories use in content DAM to FAL Migration tx_dam sys_file ext:filemetadata tx_dam_categories sys_file_metadata sys_category some fields may be lost (if they don’t exist in sys_file_metadata) add’l data DAM to FAL Migration • Extension dam_falmigration https://github.com/froemken/t3ext-dam_falmigration • Migrates tx_dam records to sys_file • Migrates tx_dam metadata to sys_filemetadata • Migrates media-tags from RTE to linktags • Migrates dam_category to sys_category DAM to FAL Migration • typo3/cli_dispatch.phpsh extbase… [help] dammigration:migratedamrecords dammigration:migraterelations dammigration:migratedamcategories dammigration:migratedamcategoryrelations dammigration:migratedamselections dammigration:migratemediatagsinrte execute this after upgrade has been made in install tool execute before editing content Update Language Packs Änderungen in Extbase • New Property Mapper • Recursive Validation Scheduler Tasks • It may be necessary to re-create scheduler tasks Fragen ? Download Slides • http://jweiland.net/t3dd14 Let us be your host