Project

General

Profile

Migration » History » Version 6

Enis Nuredini, 08.02.2023 16:55

1 1 Benjamin Baer
h1. Update Typo3 v8 > v9 > v10
2
3
h2. Preparation Typo3 v8
4
5
* Update Extensions to avoid problems after update.
6
** The IG LDAP Extension is the most likely culprit, we recommend to update to version 3.6.0 (which is compatible for typo3 v8 - v10). (Warning: later versions had problem with our LDAP Server, do not install any newer version if not needed)
7
*** Open the ldap 3.6 extension config dialog and save it, this prevents error after typo3 update to 9
8
*** Check if login still works (if not, it is possible to create new local admin users via /typo3/install.php)
9
** Update QFQ
10
* To easily downgrade again:
11
** copy the entire `typo3conf` Folder and store it in a temporary folder.
12
** Backup the typo3 database
13
14 3 Benjamin Baer
Versions of Extensions:
15 4 Benjamin Baer
|_.Extension|_.Version|
16 3 Benjamin Baer
| ig_ldap_sso | 3.6.0 |
17
18
19 1 Benjamin Baer
h2. upgrade to newest version of Typo3 v9
20
21
* download 9.5.26
22
* replace symlink typo3_src
23
<pre>
24
rm typo3_src
25
ln -s /var/www/typo3_src-9.5.26/ typo3_src
26
</pre>
27
28
* go to installtool: /typo3/install.php
29
* Run the upgrade wizard under menu "Upgrade"
30
** Whenever there is an option, choose the default (most of the time to not do it, like backward compability to typo3 7 etc.)
31
* Afterwards run the database analyzer and apply the changes
32
* Go to "Environment > Directory Status" and autofix problems (this should create .htaccess for page slugs)
33
* Flush Caches
34
* Try to login to the backend
35
* Update to the newest Version of uzh_cd: https://www.math.uzh.ch/repo/?dir=uzhcd/v9
36
** Please note changes that have to be made to the config:
37
*** Remove all default js and css references for qfq, they are included now
38
*** Rewrite cd.fullWidth.pidList = 5,10 to: 
39
    <pre>cd.fullWidth.pidList = 5 in tree.rootLineIds || 10 in tree.rootLineIds</pre>
40
* If not happened before, update QFQ: https://qfq.io/download/?dir=releases (at least v 22.10.1)
41
* Do not update ig_ldap past 3.6.0!
42 3 Benjamin Baer
43
Versions of Extensions:
44 4 Benjamin Baer
|_.Extension|_.Version|
45 3 Benjamin Baer
| ig_ldap_sso | 3.6.0 |
46 5 Benjamin Baer
| uzh_cd_extension | 22.11.07 + |
47 3 Benjamin Baer
| qfq | 22.10.1 + |
48
49 1 Benjamin Baer
50 6 Enis Nuredini
.h3 Enable content columns
51
!columnDesignT3V9.png!
52
53 1 Benjamin Baer
h2. Upgrade to Typo3 v10
54
55
* download Typo3 v10
56
<pre>
57
cd /var/www/
58
wget --content-disposition https://get.typo3.org/10.4.15
59
tar -xzf typo3_src-10.4.15.tar.gz
60
rm typo3_src-10.4.15.tar.gz
61
</pre>
62
63
* update reference index:
64
** “System” > “DB check” module and use the “Check and update global reference index” function.
65
*** https://docs.typo3.org/m/typo3/guide-installation/master/en-us/Upgrade/UpdateReferenceIndex/Index.html
66
67
* replace symlink
68
<pre>
69
rm typo3_src
70
ln -s /var/www/typo3_src-10.4.15/ typo3_src
71
</pre>
72
73
* upgrade wizzard
74
** go install tool: /typo3/install.php
75
** upgrade > run upgrade wizard
76
** execute all except the ones that install extensions
77
** Analyze Database Structure > apply all changes
78
** Dump TCA
79
80
81
* clear caches
82
** Maintanance > Flush Cache
83
84
* delete the other temporary files, which TYPO3 saves in typo3temp/ by doing:
85
** Install tool > Maintanance > Remove Temporary Assets
86
87
* Go to "Environment > Directory Status" and autofix problems (this should create/update .htaccess for page slugs)
88
89
* Create a SiteConfiguration: typo3 Backend > Sites > New Configuration 
90
** This is needed for slugs to work. Also you need to create a second language entry here, if you have a german/english site.
91
92 2 Benjamin Baer
* Open any page with a qfq record, you will get a warning message that you need to update {{pageAlias:T}} and {{pageId:T}} with an option to automatically do this > run the updater
93
** Afterwards click on check again and then choose "to never check for this again".
94
** Please note that all handwritten urls in qfq and form records have to be changed to slugs!
95
** Check if everything is working and make adjustment. Usually it just misses the slugs.
96
** For multilanguage setup, note that there is no longer an L=1 url parameter and you have to adjust records accordingly
97
98 1 Benjamin Baer
h2. Nginx
99
100
NGinx does not read .htaccess files, so you need to manually add the config to your nginx sites. Here is an include:
101
102
<pre>
103
# Compressing resource files will save bandwidth and so improve loading speed especially for users
104
# with slower internet connections. TYPO3 can compress the .js and .css files for you.
105
# *) Set $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = 9 for the Backend
106
# *) Set $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 9 together with the TypoScript properties
107
#    config.compressJs and config.compressCss for GZIP compression of Frontend JS and CSS files.
108
location ~ \.js\.gzip$ {
109
    add_header Content-Encoding gzip;
110
    gzip off;
111
    types { text/javascript gzip; }
112
}
113
location ~ \.css\.gzip$ {
114
    add_header Content-Encoding gzip;
115
    gzip off;
116
    types { text/css gzip; }
117
}
118
119
# TYPO3 - Rule for versioned static files, configured through:
120
# - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']
121
# - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename']
122
if (!-e $request_filename) {
123
    rewrite ^/(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ /$1.$3 last;
124
}
125
126
# TYPO3 - Block access to composer files
127
location ~* composer\.(?:json|lock) {
128
    deny all;
129
}
130
131
# TYPO3 - Block access to flexform files
132
location ~* flexform[^.]*\.xml {
133
    deny all;
134
}
135
136
# TYPO3 - Block access to language files
137
location ~* locallang[^.]*\.(?:xml|xlf)$ {
138
    deny all;
139
}
140
141
# TYPO3 - Block access to static typoscript files
142
location ~* ext_conf_template\.txt|ext_typoscript_constants\.txt|ext_typoscript_setup\.txt {
143
    deny all;
144
}
145
146
# TYPO3 - Block access to miscellaneous protected files
147
location ~* /.*\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql|sqlite)$ {
148
    deny all;
149
}
150
151
# TYPO3 - Block access to recycler and temporary directories
152
location ~ _(?:recycler|temp)_/ {
153
    deny all;
154
}
155
156
# TYPO3 - Block access to configuration files stored in fileadmin
157
location ~ fileadmin/(?:templates)/.*\.(?:txt|ts|typoscript)$ {
158
    deny all;
159
}
160
161
# TYPO3 - Block access to libraries, source and temporary compiled data
162
location ~ ^(?:vendor|typo3_src|typo3temp/var) {
163
    deny all;
164
}
165
166
# TYPO3 - Block access to protected extension directories
167
location ~ (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ {
168
    deny all;
169
}
170
171
172
location / {
173
    try_files $uri $uri/ /index.php$is_args$args;
174
}
175
176
location ~ [^/]\.php(/|$) {
177
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
178
    if (!-f $document_root$fastcgi_script_name) {
179
        return 404;
180
    }
181
    fastcgi_buffer_size 32k;
182
    fastcgi_buffers 8 16k;
183
    fastcgi_connect_timeout 240s;
184
    fastcgi_read_timeout 240s;
185
    fastcgi_send_timeout 240s;
186
187
    # this is the PHP-FPM upstream - see also: https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm
188
    include snippets/fastcgi-php.conf;
189
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
190
191
}
192
</pre>
193
194
the fastcgi_pass needs to be edited, here it is for standard ubuntu 20.04 nginx server.
195
196
You can save this file to /etc/nginx/snippets/typo3.conf and include it in your site config via `include ../snippets/typo3.conf`