Update from 7.6 or lower
04. Mai 2022
04. Mai 2022
At first: Always make notes of what you've changed so you can repeat it at any time. This could look like Example Update Aus:sicht.
When updating fom 7.6 or even lower to 10.4 or 11.5 you have to update to 8.x and 9.x first to fetch all of upgrade wizards needed. But there is an easier way to do with the extension ichhabrecht/core-upgrader (thanks to Nicole Cordes https://github.com/IchHabRecht/core_upgrader).
This extension helps to upgrade to 10.4 right away. Unfortunately there is no version for 11.5 yet, so there is one more step needed to go to 11.5.
Here is the way to go:
composer require ichhabrecht/core-upgrader 1.3.*
vendor/bin/typo3cms install:generatepackagestates
vendor/bin/typo3cms coreupgrader:upgrade
vendor/bin/typo3cms upgrade:run all
composer update
vendor/bin/typo3cms upgrade:prepare
vendor/bin/typo3cms upgrade:run all
vendor/bin/typo3cms cache:flush
When the backend comes up again and the page tree loads you can go on with updating your template extension and further extensions. For this have a look at: Update code with rector. And even more optimisation: Check for PSR-12.
Move TypoSript code and backend templates from backend to your config extension.
If you have some code in ext_tables.php you also have to move to Configuration/TCA/Overrides/[tablename].php
. For more information have a look at https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ExtensionArchitecture/ConfigurationFiles/Index.html.
In the past, content elements were built with pure TypoScript. With fluid there ist now the lib.contentElement to render in fluid files. Now we have two options: Rebuild the TypoScript code for each element in fluid or get the TypoScript working again with some little changes.
Here I describe the second variant:
lib.contentElement {
templateRootPaths {
10 = EXT:zwbisdrei_config/Resources/Private/Plugins/Content/Templates/
}
layoutRootPaths {
10 = EXT:zwbisdrei_config/Resources/Private/Plugins/Content/Layouts/
}
partialRootPaths {
10 = EXT:zwbisdrei_config/Resources/Private/Plugins/Content/Partials/
}
}
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
f:schemaLocation="https://fluidtypo3.org/schemas/vhs-master.xsd"
xmlns="http://www.w3.org/1999/xhtml"
lang="en"
data-namespace-typo3-fluid="true">
<f:render partial="Header/All" arguments="{_all}" />
</html>
tt_content.textpic.10 < lib.stdheader
tt_content.textpic.20 >
tt_content.textpic.20 = CASE
tt_content.textpic.20.key.field = imageorient
tt_content.textpic.20.18 = COA
tt_content.textpic.20.18 {
# render content element
}
lib.stdheader < lib.contentElement
lib.stdheader.templateName = StdHeader
tt_content.textpic = COA
tt_content.textpic {
10 < lib.stdheader
20 = CASE
20.key.field = imageorient
20.18 = COA
20.18 {
# render content element
}
}
For big systems it could be usefull to truncate and remove table before the updating steps. This reduces the database updating time quite a lot.
vendor/bin/typo3cms cleanup:deletedrecords
After all this effort: Keep your installation clean.
config {
# is now defined in sites config
doctype = html5
doctypeSwitch = 1
metaCharset = UTF-8
linkVars = L
sys_language_mode = content_fallback
sys_language_uid = 0
language = de
locale_all = de_DE.utf8
# old extensions not used anymore
simulateStaticDocuments = 0
tx_realurl_enable = 1
}
Check if installToolPassword is present and not empty in LocalConfiguration.php.
Change paths from old:layoutRootPath
templateRootPath
partialRootPath
to new:layoutRootPaths.10
templateRootPaths.10
partialRootPaths.10
In very old installations sometimes images like logo, CSS and JavaScript is not included in config extension yet. Move this from /images or /external to Resources/Public/[Css|JavaScript|Images].
If slugs are missing in page settings you can use the ig_slugs extension to rebuild:
composer req internetgalerie/ig-slug
# Fix for error message: Data truncated for column 'media' at row 2 (tt_content)
UPDATE `tt_content` SET media=0 WHERE media IS NULL;
# Fix for error message: Data truncated for column 'image' at row 2 (tt_content)
UPDATE `tt_content` SET image=0 WHERE image IS NULL;
# Fix for error message: Data truncated for column 'media' at row 2 (pages)
UPDATE `pages` SET media=0 WHERE media IS NULL;