Project

General

Profile

Migration » History » Version 28

Carsten Rose, 02.04.2023 15:03

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