S2member-pro breaking website with PHP 8

Nope not yet. Will try tomorrow

I don’t know how to properly remove it - now it gives me:
Fatal error : Uncaught ValueError: Unknown format specifier “”" in /var/www/openmtbmap.org/htdocs/test3/wp-content/plugins/s2member-pro/src/includes/syscon.inc.php:137 Stack trace: #0 /var/www/openmtbmap.org/htdocs/test3/wp-content/plugins/s2member-pro/src/includes/syscon.inc.php(137): sprintf() #1 /var/www/openmtbmap.org/htdocs/test3/wp-includes/class-wp-hook.php(292): ws_plugin__s2member_pro_default_options() #2 /var/www/openmtbmap.org/htdocs/test3/wp-includes/plugin.php(212): WP_Hook->apply_filters() #3 /var/www/openmtbmap.org/htdocs/test3/wp-content/plugins/s2member/src/includes/syscon.inc.php(355): apply_filters() #4 /var/www/openmtbmap.org/htdocs/test3/wp-content/plugins/s2member/s2member.php(155): ws_plugin__s2member_configure_options_and_their_defaults() #5 /var/www/openmtbmap.org/htdocs/test3/wp-admin/includes/plugin.php(2300): include(’…’) #6 /var/www/openmtbmap.org/htdocs/test3/wp-admin/plugins.php(191): plugin_sandbox_scrape() #7 {main} thrown in /var/www/openmtbmap.org/htdocs/test3/wp-content/plugins/s2member-pro/src/includes/syscon.inc.php on line 137

could you please check that line and send me a correct version?

okay - I just deleted the whole line - no error so far. Not fully sure however if there aren’t any other errors. I don’t use clickbank anyhow…

Well it would be great if you can check s2member and s2member-pro more thoroughly for php 8 errors then publish a new version. Most plugins on wordpress.org by now are php 8 compatible - 2,3 months back this was not the case.
As in my logs there was at least one other error related to s2member (put the logs above anyhow). I would like to update to PHP 8 rather sooner than later…

For me I will likely just ditch the q-translate x related plugins (as qtranslate x was replaced by qtranslate xt and an update is very unlikely), and wait for Search Regex to publish a new version… My other plugins except s2member-pro at least all seem to work fine on test server.

I was mistaken about
Broken Link Checker WPMU Dev,
WP Cerber Security, Anti-spam & Malware Scan

they are working fine.

All other plugins are working now - it is really bloody time for s2member pro to be php8 compatible. I tested it since quite some time now - just remove that ■■■■ line 137 and it’s allright. Nearly all wordpress plugins are now php8 compatible. s2member-pro is more and more the lonely exceptiion.
PHP8 adoption has gone pretty far already.

+1 request to authors to make it adopted!

Has this issue been fixed yet? I just had the same problem when my provider updated to PHP8. I first installed S2Member Pro in November, so I don’t have any older files on the server. I had to comment out that same Line 137 to get my site to load.

Rick Waller

No it hasn’t been fixed yet. There has been an update since I posted that fix but it wasn’t included - I really wonder why. No one needs that line!

A critical point for me as well. Is s2member still actively developed and maintained at all? I had the impression that things were looking up again after the upheaval. Now, however, down again for several months.

Is there any doubt that it can be relied on in the future? There will come the point, where we need a PHP 8 solution.

1 Like

Latest update and it is still broken on PHP 8

Yes - here again what to delete for everyone:

  	'pro_clickbank_username'                  => '', 'pro_clickbank_clerk_key' => '', 'pro_clickbank_developer_key' => '', 'pro_clickbank_secret_key' => '', 'pro_clickbank_return_template_header' => sprintf(_x('<div><small style="font-size:70%;">ClickBank is the retailer of products on this site. CLICKBANK® is a registered trademark of Click Sales, Inc., a Delaware corporation located at 917 S. Lusk Street, Suite 200, Boise Idaho, 83706, USA and used by permission. ClickBank\'s role as retailer does not constitute an endorsement, approval or review of these products or any claim, statement or opinion used in promotion of these products.</small></div><p>%1$s <strong><em>says&hellip;</em></strong></p>', 's2member-front', 's2member'), esc_html($_SERVER['HTTP_HOST'])),
1 Like

I just upgraded to PHP8 and this error still exists and still breaks the site. The crazy thing is, it’s caused by one line that includes some totally unnecessary inline CSS: style=“font-size:70%;”

All that needs to be done is for the developer to remove the inline style. Bingo, now your plugin works with PHP8!

Again, the line of code is here: /plugins/s2member-pro/src/includes/syscon.inc.php on line 137

1 Like

Looks like my comment was too hasty. While my initial fixed resolved the site immediately crashing, I found another fatal error on my Stripe checkout page. So I guess we all need to continue to wait for the developer to make S2 fully compatible with PHP8. Here is the new error:
PHP Fatal error: Uncaught Error: Undefined constant “s2member_pro_stripe_checkout” in /wp-content/plugins/s2member/src/includes/classes/utilities.inc.php(49)

This error does not appear on PHP7.4

Just jumping on to say I just experienced this too. Used a VPS install script that set up PHP8. Manually downgraded to 7.4 and no errors. 7.4’s security support runs out in November so hoping this is fixed soon.

For me stripe Pro Form works fine on PHP 8.1

I was using Stripe Pro forms, but on 8.0 because that what was on the VPS install stack I was using. I’ll try 8.1 to see if it’s resolved there, but I can’t promise when :slight_smile:

I also used 8.0 without problems. Plan to update to 8.2 soon

well great the latest version finally fixed it. Didn’t look into the fix but guess it’s just the line removed.

@openmtbmap I’ve upgraded, but haven’t tried it yet. Wondering if there’s still a concern with object caching before I try to upgrade my server stack for s2 again.

Object caching always caused me plenty of problems. Not worth bothering with it.

1 Like