Sites not working with PHP8 Topic is solved

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
snowgoose
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Mar 13, 2019 11:42 am

Sites not working with PHP8

Post by snowgoose » Fri Jan 14, 2022 6:17 pm

Hi,
Can anyone help me with this please? How do I go about finding out what is causing my websites to fail when I switch to PHP8?

I have received warnings of PHP7.4 not being supported later this year, and everything I have read says that Joomla 3 & 4 support PHP8. But if I switch to PHP8 most of my sites stop working. I have uninstalled unnecessary extensions, and disabled in turn each module. I have around 180 active plug-ins. Do I really have to disable them all one by one until I find what's causing it to not work? Or is there an easier way. I realise that I can stick with PHP7.4 but I'll have to face the pain sooner or later.

The one I'm looking at right now fails with page not found errors and reports the following:
0 count(): Argument #1 ($value) must be of type Countable|array, null given

Thanks
Dave
Last edited by toivo on Sat Jan 15, 2022 1:08 am, edited 1 time in total.
Reason: mod note: moved from 3.x General Questions

Olympe30
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Dec 12, 2021 9:28 am

Re: Sites not working with PHP8

Post by Olympe30 » Fri Jan 14, 2022 7:00 pm

Hi

Joomla support PHP8
But your template and your extensions may be not!

Look at the developers sites...

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13976
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Sites not working with PHP8

Post by toivo » Fri Jan 14, 2022 8:19 pm

Change the level of error reporting in Global Configuration to 'Maximum' and enable and configure the plugin System - Debug so that it applies to your user group, Super Users. The stack trace following the error will then show where the error occurs.

It is also possible to back up the website for example in Akeeba Backup and restore the website into a localhost site on your workstation, running a bundle like Wampserver, which allows several versions of PHP to be installed as extensions. You can then switch from PHP 7.4 to 8.0 or even 8.1 in a fully controlled test environment, do the debugging and find out which extensions are not compatible.
Toivo Talikka, Global Moderator

snowgoose
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Mar 13, 2019 11:42 am

Re: Sites not working with PHP8

Post by snowgoose » Fri Jan 14, 2022 9:30 pm

toivo wrote:
Fri Jan 14, 2022 8:19 pm
Change the level of error reporting in Global Configuration to 'Maximum' and enable and configure the plugin System - Debug so that it applies to your user group, Super Users. The stack trace following the error will then show where the error occurs.
Thank you Toivo! :)

As soon as I switched Error Reporting to maximum, the error popped up immediately and I could disable the plug-in responsible. That has saved me hours of work!

Many thanks,
Dave

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13976
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Sites not working with PHP8

Post by toivo » Fri Jan 14, 2022 9:52 pm

Glad that it helped. It could still be useful to host a copy of the website initially in a test environment before switching to PHP 8 and above.
Toivo Talikka, Global Moderator


Post Reply

Return to “Extensions for Joomla! 3.x”