Project

General

Profile

Actions

Migration » History » Revision 27

« Previous | Revision 27/82 (diff) | Next »
Carsten Rose, 02.04.2023 15:02


Update Typo3 v8 > v9 > v10

  • 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. *
Typo3 PHP required T3 U18.04 U20.04 U22.04 PHPUnit 6 PHPUnit 7 PHPUnit 8 PHPUnit 9 PHPUnit 10
V9 7.2 7.4 8.1 7.0-7.2 7.1-7.3 >=7.2 >=7.3 >=8.1
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
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
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

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

upgrade to newest version of Typo3 v9

  • download 9.5.26
  • replace symlink typo3_src
    rm typo3_src
    ln -s /var/www/typo3_src-9.5.26/ typo3_src
    
  • go to installtool: /typo3/install.php
  • 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.)
  • Afterwards run the database analyzer and apply the changes
  • 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:
        cd.fullWidth.pidList = 5 in tree.rootLineIds || 10 in tree.rootLineIds
  • If not happened before, update QFQ: https://qfq.io/download/?dir=releases (at least v 22.10.1)
  • Do 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 +

Enable content columns

Edit root page

Cache problem

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

Upgrade to Typo3 v10

  • download Typo3 v10
    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
    
  • replace symlink
    rm typo3_src
    ln -s /var/www/typo3_src-10.4.15/ typo3_src
    
  • 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
      <Directory /var/www/html>
          Options -Indexes +FollowSymLinks +Includes
          AllowOverride All
          Order allow,deny
          Allow from all   
          DirectoryIndex index.php index.html index.shtml
      </Directory>
      
  • 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:

Nginx

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

# 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;

}

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`

Updated by Carsten Rose about 1 year ago · 27 revisions