WordPress plugin update kills site (2.4.6 --> 2.4.7 and 2.4.8)

I have the WP-Discourse plugin running on a WordPress multisite. Two sites within the network use it for SSO for two different Discourse sites. Other network sites don’t use the plugin. It works fine through version 2.4.6, but beyond that it results in a critical error on the whole network. After the 2.4.7 update failed, I waited for the next version to try again, but same issue.

The network is running WordPress 5.4.1 and PHP 5.6.40. I mention this because I know both are old, but there are reasons we can’t upgrade either.

What do I need to do to troubleshoot this? I appreciate any pointers or tips.

Can you elaborate on that error?

EOL over 4 years ago…

3 Likes

Is there? Quite usually that means same as at least one abandonded custom plugin. Then your real issue is not WP-Discourse, aged broken PHP-version or leaking WordPress — you should fix ASAP that reason why you are using way too old versions.

2 Likes

I mean, I’m not proud of it, but there are themes in use on the multisite network that can’t be updated and that break when we’ve tried updating WordPress or PHP. For what it’s worth, our non-multisite websites are all kept up to date, only the multisite is a ****show…

I had to quickly restore the 2.4.6 version of the plugin to fix the site so I don’t have much detail. I’ll see if I can reproduce the problem briefly with logging turned on.

Here are all the relevant errors and warnings:

[06-Jan-2023 18:11:10 UTC] PHP Fatal error:  Call to undefined function register_block_type_from_metadata() in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/blocks/comments/comments.php on line 46

[06-Jan-2023 18:11:10 UTC] PHP Fatal error:  Call to undefined function register_block_type_from_metadata() in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/blocks/comments/comments.php on line 46

[06-Jan-2023 18:11:12 UTC] PHP Fatal error:  Call to undefined function register_block_type_from_metadata() in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/blocks/comments/comments.php on line 46

[06-Jan-2023 18:11:12 UTC] PHP Fatal error:  Call to undefined function register_block_type_from_metadata() in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/blocks/comments/comments.php on line 46

[06-Jan-2023 18:11:14 UTC] PHP Fatal error:  Call to undefined function register_block_type_from_metadata() in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/blocks/comments/comments.php on line 46
[06-Jan-2023 18:11:32 UTC] PHP Fatal error:  Class 'WPDiscourse\DiscourseComment\DiscourseComment' not found in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/wp-discourse.php on line 70

[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:32 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37

[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
[06-Jan-2023 18:11:33 UTC] PHP Warning:  Missing argument 2 for WPDiscourse\Logs\Logger::create(), called in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/discourse-base.php on line 62 and defined in /var/www/vhosts/groups.ismrm.org/httpdocs/wp-content/plugins/wp-discourse/lib/logs/logger.php on line 37
1 Like

I don’t know anything, but I’ve seen very similar errors on WordPress when PHP is way too old (or too new, that is an issue every now and then too)

That function was introduced in Wordpress 5.5.0 so there you have it. Wordpress 5.5 is over 2.5 years old. You should really address the “reasons” that are blocking you from upgrading and upgrade Wordpress (and PHP).

Either the plugin or the Wordpress theme is going to break, and the theme is the one that doesn’t work on a current Wordpress. So to put it bluntly, this is a problem of the theme and not of the WP Discourse plugin.

3 Likes

If that’s the case, and if there’s no intention to make it backwards-compatible as before, then the WP-Discourse plugin page needs to be updated to state “Requires WordPress Version: 5.5 or higher.” It currently states “4.7 or higher.”

2 Likes

I don’t know what WP theme you use, but sometimes (I’ve been through it), making a theme PHP 7+ compatible is a matter of a few lines of code to fix.