Project

General

Profile

Migration » History » Version 26

Carsten Rose, 02.04.2023 12:29

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