upgrade to typo3 6 - jweiland.net · changes in typoscript file.treatidasreference = 1...

77
Upgrade to TYPO3 6.2 Jochen Weiland T3EE Cluj 2014

Upload: dothuan

Post on 13-Apr-2018

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Upgrade to TYPO3 6.2

Jochen Weiland !

T3EE Cluj 2014

Page 2: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights
Page 3: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Facts

• Customers love LTS

• Most Projects still on 4.5

Page 4: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Facts

• 4 Years since Release of 4.5

• 37 Releases since then

Page 5: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Facts

• 5 Major Releases:4.5 4.6 4.7 6.0 6.1 6.2 Each with many new features!

Page 6: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Thanks to Patrick Lobacher (who keeps track of the changes)

Page 7: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

550+ Pages of Changeshttp://typo3.org/download/release-notes/whats-new/

Page 8: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

www.lobacher.de

Page 9: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Facts

• 500.000+ Web Sites made with TYPO3

• 150 days left to update!

• ~ 3.000 Updates per work day!

Page 10: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Facts

• ~ 1.000 TYPO3 Agencies

• ~ 500 Upgrades for each Agency

Page 11: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Preparing the Upgrade

Page 12: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Important

• Never ever on live site!

• Use a copy of live site for upgrade!

• Make sure you have a backup!

Page 13: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Your Choice:

• Clean-up installation, then make copy

• faster, but changes in live site

• Make copy, then clean-up installation

• safer, but slower

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

Page 14: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Creating a Copy

• Copy complete project file structure

Page 15: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Creating a DB Copy

• Create new, empty database

• Collation: utf8_general_ci

• Duplicate the database: 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

Page 16: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Finalize Copy

• Create new domain (virtual host) and update domain records accordingly

• localconf.php (or Install Tool): Enter new database parameters

• TypoScript: Adjust baseURL

Page 17: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Clean Up Installation• Remove local, uninstalled Extensions

Page 18: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights
Page 19: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Remove installed, unused Extensions

in our example we removed: lorem_ipsum, veguestbook, timtab, adminpanel, sbaccessiblecontent, lib, div

Page 20: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

when you try to delete an extension, the number of records in the database will be shown

Page 21: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Obsolete Extensions

• May work in 6.2, but logfiles can’t be created anymore

Page 22: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Clean Up Installation

!

• Run Database Analyzer in Install Tool

• Update Required Tables

• Remove unused tables

Page 23: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Remove unused Tables

Page 24: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Shrink Database

• Decrease table size:

• cache_ …

• cachingframework_ …

• cf_ …

• sys_log, sys_stat, …

• tx_realurl_errorlog, …

SQL statement TRUNCATE will empty a table, DROP will delete a table

Page 25: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

For other tables: use phpmyadmin !For very large tables: delete (drop) table and re-create via install tool (compare table structure)

Page 26: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Update Extensions for 4.5

Page 27: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Extension Versions (4.5)

Page 28: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Warning during Upgrade TYPO3 Version

Page 29: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Warning during Upgrade PHP Version

Page 30: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Some Extensions have update scripts

Page 31: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Deprecation Log

Page 32: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Namespacingtypo3/sysext/core/Migrations/Code

for IDE:

Page 33: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Check PHP Version

• TYPO3 4.5, 4.6 work with PHP 5.2-5.5

• TYPO3 4.7 and higher require PHP 5.3-5.5

some old extensions my not be compatible with PHP 5.3+ !update realurl Extension

Page 34: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Enable Error Display

Page 35: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

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

Page 36: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Reference 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

Page 37: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Reference Index

Page 38: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Smooth Migration

• Make sure that extensions extbase and fluid are installed

• Install extension smoothmigration

• Create BE user _cli_smoothmigration

• Reload Backend

smoothmigration extension can be used in TYPO3 4.5-4.7, after upgrading to 6.2 you can uninstall it

Page 39: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Smooth Migration

Page 40: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Overview

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“

Page 41: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Database 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)

Page 42: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

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!

Page 43: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

require_once

changed in cron_printlink (pi1, pi2) and sr_language_menu (pi1) !other occurrences will be fixed after updating extensions

Page 44: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Change Symlink

• Change to new TYPO3 version:typo3_src -> typo3_src-6.2.x

• Update index.php in DOC_ROOT

Updating index.php only necessary if not symlinked !

Page 45: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Go to Install Tool

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 !

Page 46: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights
Page 47: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights
Page 48: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights
Page 49: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

After Uninstalling

Page 50: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Upgrade Wizard

Page 51: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Check Database

Don’t remove/rename fields yet, only add/modify if necessary

Page 52: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Clear Cache

Page 53: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Admin User TSconfig

• options.clearCache.system = 1

Page 54: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Update Extensions

Page 55: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights
Page 56: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Version not supported?

ext_emconf.php

Page 57: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Ext not in TER? Try GIT!

• git.typo3.org

• Repository from author, e.g.github.com/jweiland-net/rlmp_tmplselector

Page 58: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Extensions from git

• in typo3conf/ext:git clone https://github.com/jweiland-net/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

Page 59: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Changes in TypoScript

file.treatIdAsReference = 1

file.treatIdAsReference = 1

Page 60: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Editor Rights

• Backend User Rights for Non-Admins

• Enable Fields for File Information in Backend Forms

Page 61: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Grant Access to new Database Tables

Page 62: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Excludefields Metadata

Page 63: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Excludefields References

Page 64: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

DAM to FAL Migration

• First, let’s see how files are handled

Page 65: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

TYPO3 4.x

local file

uploads/media uploads/pics

uploads/

fileadmin/….

direct upload RTE upload

upload through element browser

contentelement

typo3temp/…

BROWSER

rendered images

RTE linked files

Page 66: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

TYPO3 6.x - FAL

local file

fileadmin/user_uploaddirect upload

upload through element browser RTE upload

fileadmin/_processed_

BROWSER

rendered images

fileadmin/….

Page 67: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

TYPO3 4.x DAMlocal file

fileadmin/… uploads/media uploads/pics uploads/

tx_dam/….

upload in backend

index and meta-extraction

use in content

tx_dam_categories

local file

FTP Upload

Page 68: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

TYPO3 4.x DAMlocal file

fileadmin/… uploads/media uploads/pics uploads/

tx_dam

upload in backend

index and meta-extraction

use in content

tx_dam_categories

local file

FTP Upload

Page 69: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

add’l data

DAM to FAL Migrationtx_dam

tx_dam_categories

sys_file

sys_category

sys_file_metadata

ext:filemetadata

some information may be lost (e.g. copyright)

some fields may be lost (if they don’t exist in sys_file_metadata)

Page 70: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

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 link-tags

• Migrates dam_category to sys_category

Page 71: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

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

Page 72: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Update Language Packs

Page 73: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Changes in Extbase

• New Property Mapper

• Recursive Validation

Page 74: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Scheduler Tasks

• It may be necessary to re-create scheduler tasks

Page 75: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Questions ?

Page 76: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Download Slides

• http://jweiland.net/t3ee14

Page 77: Upgrade to TYPO3 6 - jweiland.net · Changes in TypoScript file.treatIdAsReference = 1 file.treatIdAsReference = 1. Editor Rights

Let us be your host