Project

General

Profile

Migration » History » Version 27

Carsten Rose, 02.04.2023 15:02

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