Project

General

Profile

Migration » History » Revision 45

Revision 44 (Carsten Rose, 21.05.2023 11:32) → Revision 45/82 (Carsten Rose, 21.05.2023 14:05)

h1. Update Typo3 v8 > v9 > v10 

 h2. Compatibility 

  * https://typo3.org/cms/roadmap 
  * Required PHP version per Typo3, default PHP Version per Ubuntu OS, required PHP Version per PHP-Unit version. 
  * PHPUnit: Aktuell haben wir noch Ubuntu 18.04 Hosts (PHP 7.2) - Ziel waere schnell auf Ubuntu 20.04 zu migrieren 

    * Dev Umgebung mit U18 / PHP7.2 sollten PHPUnit 8 nutzen. 
    * Dev Umgebung mit >=U20 / PHP7.4 sollten PHPUnit 9 nutzen. 
    * "ig_ldap_sso_auth":https://extensions.typo3.org/extension/ig_ldap_sso_auth, @/scratch/software/typo3/extension@ 

 | *Typo3* | *T3 EOL*     | *QFQ* | *PHP required T3*     | *U18.04* | *U20.04* | *U22.04* | *PHPUnit 6* | *PHPUnit 9* | *PHPUnit 10* |*ldap 3.6.0*|*ldap 3.7.1*| 
 | *V8*      |-31.03.2020-| ?       | 7.0-7.4               | 7.2        | 7.4        | -8.1-      | 7.0-7.2       | >=7.3         | ->=8.1-        | 8.7 - 10.4 | -            | 
 | *V9.5*    |-30.04.2021-| 19.5.0| 7.2-7.4               | 7.2        | 7.4        | -8.1-      | 7.0-7.2       | >=7.3         | ->=8.1-        | 8.7 - 10.4 | 9.5 - 11.5 | 
 | *V10*     |_30.04.2023_|22.10.1| 7.2-7.4               | 7.2        | 7.4        | -8.1-      | 7.0-7.2       | >=7.3         | ->=8.1-        | 8.7 - 10.4 | 9.5 - 11.5 | 
 | *V11*     | 31.10.2024 | -       | 7.4, 8.0-8.2          | -7.2-      | 7.4        | 8.1        | -7.0-7.2-     | >=7.3         | >=8.1          | -            | 9.5 - 11.5 | 
 | *V12*     | 30.04.2026 | -       | 8.1, 8.2              | -7.2-      | -7.4-      | 8.1        | -7.0-7.2-     | >=7.3         | >=8.1          | -            | -            | 


 h2. Preparation Typo3 v8 

 * Update Extensions to avoid problems after update. 
 ** 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) 
 *** Open the ldap 3.6 extension config dialog and save it, this prevents error after typo3 update to 9 
 *** Check if login still works (if not, it is possible to create new local admin users via /typo3/install.php) 
 ** Update QFQ 
 * To easily downgrade again: 
 ** copy the entire `typo3conf` Folder and store it in a temporary folder. 
 ** Backup the typo3 database 

 Versions of Extensions: 
 |_.Extension|_.Version| 
 | ig_ldap_sso | 3.6.0 | 

 


 h2. upgrade to newest version of Typo3 v9 

 * download 9.5.26 
 * replace symlink typo3_src 
 <pre> 
 rm typo3_src 
 ln -s /var/www/typo3_src-9.5.26/ typo3_src 
 </pre> 

 * go to installtool: /typo3/install.php 
 * *Upgrade*: Run the upgrade wizard under  
 menu "Upgrade" 
 ** Whenever there is an option, choose the default (most of the time to not do it, like backward compability to typo3 7 etc.) 
 * *Maintenance*:  

   * Database Afterwards run the database analyzer and apply the changes 
   
 * Flush Caches 

 * *Environment*: Go to "Environment > Directory Status" and autofix problems (this should create .htaccess for page slugs) 

 
 * Flush Caches 
 * Try to login to the backend 
 * Update to the newest Version of uzh_cd: https://www.math.uzh.ch/repo/?dir=uzhcd/v9 
 ** Please note changes that have to be made to the config: 
 *** Remove all default js and css references for qfq, they are included now 
 *** Rewrite cd.fullWidth.pidList = 5,10 to:  
     <pre>cd.fullWidth.pidList = 5 in tree.rootLineIds || 10 in tree.rootLineIds</pre> 
 * If not happened before, update QFQ: https://qfq.io/download/?dir=releases (at least v 22.10.1) 
 * Do *not* not update ig_ldap past 3.6.0! 

 Versions of Extensions: 
 |_.Extension|_.Version| 
 | ig_ldap_sso | 3.6.0 | 
 | uzh_cd_extension | 22.11.07 + | 
 | qfq | 22.10.1 + | 

 h3. Enable content columns 

 Edit root page 

 !columnDesignT3V9.png! 

 h3. Cache problem 

 Pages don't refresh immediately when the backend user is logged in. This behavior is not given with logged out beUser. 

 

 h2. Upgrade to Typo3 v10 

 * download Typo3 v10 
 <pre> 
 cd /var/www/ 
 wget --content-disposition https://get.typo3.org/10.4.15 
 tar -xzf typo3_src-10.4.15.tar.gz 
 rm typo3_src-10.4.15.tar.gz 
 </pre> 

 * update reference index: 
 ** “System” > “DB check” module and use the “Check and update global reference index” function. 
 *** https://docs.typo3.org/m/typo3/guide-installation/master/en-us/Upgrade/UpdateReferenceIndex/Index.html 

 * replace symlink 
 <pre> 
 rm typo3_src 
 ln -s /var/www/typo3_src-10.4.15/ typo3_src 
 </pre> 

 Hint: After changing the symlink to newer typo3 versions sometimes it's helpful to delete the content from typo3temp folder. This clears some errors that can appear after version upgrade. 
 * upgrade wizzard 
 ** go install tool: /typo3/install.php 
 ** upgrade > run upgrade wizard 
 ** execute all except the ones that install extensions 
 ** Analyze Database Structure > apply all changes 
 ** Dump TCA 


 * clear caches 
 ** Maintanance > Flush Cache 

 * delete the other temporary files, which TYPO3 saves in typo3temp/ by doing: 
 ** Install tool > Maintanance > Remove Temporary Assets 

 * Go to "Environment > Directory Status" and autofix problems (this should create/update .htaccess for page slugs) 

 * Create a SiteConfiguration: typo3 Backend > Sites > New Configuration  
 ** This is needed for slugs to work. Also you need to create a second language entry here, if you have a german/english site. 

 * Configure apache webserver correctly: 
 ** If not done then insert following parameters in /etc/apache2/sites-enabled/default-ssl.conf 
 <pre><code class="yaml"> 
 <Directory /var/www/html> 
	 Options -Indexes +FollowSymLinks +Includes 
	 AllowOverride All 
	 Order allow,deny 
	 Allow from all    
	 DirectoryIndex index.php index.html index.shtml 
 </Directory> 
 </code></pre> 

 ** Execute 'service apache2 reload' in terminal 

 * 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 
 ** Afterwards click on check again and then choose "to never check for this again". 
 ** Please note that all handwritten urls in qfq and form records have to be changed to slugs! 
 ** Check if everything is working and make adjustment. Usually it just misses the slugs. 
 ** For multilanguage setup, note that there is no longer an L=1 url parameter and you have to adjust records accordingly 

 * 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: 
 !felogin.png! 

 h2. Nginx 

 NGinx does not read .htaccess files, so you need to manually add the config to your nginx sites. Here is an include: 

 <pre> 
 # Compressing resource files will save bandwidth and so improve loading speed especially for users 
 # with slower internet connections. TYPO3 can compress the .js and .css files for you. 
 # *) Set $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = 9 for the Backend 
 # *) Set $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 9 together with the TypoScript properties 
 #      config.compressJs and config.compressCss for GZIP compression of Frontend JS and CSS files. 
 location ~ \.js\.gzip$ { 
     add_header Content-Encoding gzip; 
     gzip off; 
     types { text/javascript gzip; } 
 } 
 location ~ \.css\.gzip$ { 
     add_header Content-Encoding gzip; 
     gzip off; 
     types { text/css gzip; } 
 } 

 # TYPO3 - Rule for versioned static files, configured through: 
 # - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename'] 
 # - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename'] 
 if (!-e $request_filename) { 
     rewrite ^/(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ /$1.$3 last; 
 } 

 # TYPO3 - Block access to composer files 
 location ~* composer\.(?:json|lock) { 
     deny all; 
 } 

 # TYPO3 - Block access to flexform files 
 location ~* flexform[^.]*\.xml { 
     deny all; 
 } 

 # TYPO3 - Block access to language files 
 location ~* locallang[^.]*\.(?:xml|xlf)$ { 
     deny all; 
 } 

 # TYPO3 - Block access to static typoscript files 
 location ~* ext_conf_template\.txt|ext_typoscript_constants\.txt|ext_typoscript_setup\.txt { 
     deny all; 
 } 

 # TYPO3 - Block access to miscellaneous protected files 
 location ~* /.*\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql|sqlite)$ { 
     deny all; 
 } 

 # TYPO3 - Block access to recycler and temporary directories 
 location ~ _(?:recycler|temp)_/ { 
     deny all; 
 } 

 # TYPO3 - Block access to configuration files stored in fileadmin 
 location ~ fileadmin/(?:templates)/.*\.(?:txt|ts|typoscript)$ { 
     deny all; 
 } 

 # TYPO3 - Block access to libraries, source and temporary compiled data 
 location ~ ^(?:vendor|typo3_src|typo3temp/var) { 
     deny all; 
 } 

 # TYPO3 - Block access to protected extension directories 
 location ~ (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ { 
     deny all; 
 } 


 location / { 
     try_files $uri $uri/ /index.php$is_args$args; 
 } 

 location ~ [^/]\.php(/|$) { 
     fastcgi_split_path_info ^(.+?\.php)(/.*)$; 
     if (!-f $document_root$fastcgi_script_name) { 
         return 404; 
     } 
     fastcgi_buffer_size 32k; 
     fastcgi_buffers 8 16k; 
     fastcgi_connect_timeout 240s; 
     fastcgi_read_timeout 240s; 
     fastcgi_send_timeout 240s; 

     # this is the PHP-FPM upstream - see also: https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/#connecting-nginx-to-php-fpm 
     include snippets/fastcgi-php.conf; 
     fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; 

 } 
 </pre> 

 the fastcgi_pass needs to be edited, here it is for standard ubuntu 20.04 nginx server. 

 You can save this file to /etc/nginx/snippets/typo3.conf and include it in your site config via `include ../snippets/typo3.conf`