Project

General

Profile

Migration » History » Version 19

Enis Nuredini, 17.02.2023 14:28

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