Project

General

Profile

Migration » History » Version 21

Carsten Rose, 27.03.2023 13:11

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