Updating PHP version from 7 to 8 causes panel error

Hello! When I switch the PHP version Kirby is running on (7.4.21 to 8.08), the front page of my Kirby panel throws up an error when loading site sections and draft posts.

Required parameter $name follows optional parameter $type

Is there a document somewhere covering changes you need to make for Kirby to work with PHP 8+?

What is your Kirby version?

I’m on v3.6.6

Does the error have more information in your php error logs? Also check browser console (with debug on)

Thanks pixelijn, the console is getting the following error for each section of content that isn’t loading:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

I don’t see anything relevant in the Apache logs:

[Thu Dec 15 13:15:56.376195 2022] [:notice] [pid 89062] FastCGI: process manager initialized (pid 89062)
[Thu Dec 15 13:15:56.389499 2022] [mpm_prefork:notice] [pid 1486] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_wsgi/3.5 Python/2.7.18 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Thu Dec 15 13:15:56.389522 2022] [core:notice] [pid 1486] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf'
[Thu Dec 15 13:15:56.389528 2022] [mpm_prefork:notice] [pid 1486] AH00171: Graceful restart requested, doing restart
[Thu Dec 15 13:15:56.595014 2022] [:notice] [pid 89081] FastCGI: process manager initialized (pid 89081)
[Thu Dec 15 13:15:56.616036 2022] [mpm_prefork:notice] [pid 1486] AH00163: Apache/2.4.46 (Unix) OpenSSL/1.0.2u mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_wsgi/3.5 Python/2.7.18 mod_perl/2.0.11 Perl/v5.30.1 configured -- resuming normal operations
[Thu Dec 15 13:15:56.616057 2022] [core:notice] [pid 1486] AH00094: Command line: '/Applications/MAMP/Library/bin/httpd -f /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf'

As you can see, I’m running in MAMP locally.

Hm, as far as I know, all such issues have been fixed in the meantime and shouldn’t be present in 3.6.6. If you have a chance to update to a newer version, I’d suggest to do so.

Sorry for the long delay in response. I’ve finally managed to debug the problem by copying site files to a new installation of Kirby. The issue was the Kirby Twig plugin - I wasn’t using it so it may have been updated, but once that was deleted, everything works fine!