Too few arguments

Hi Cristian, when I am editing a post or a page on my website, I get this error:

Warning : sprintf(): Too few arguments in /home/leoraver/public_html/wp-content/plugins/s2member-pro/src/includes/syscon.inc.php on line 107

Warning : Cannot modify header information - headers already sent by (output started at /home/leoraver/public_html/wp-content/plugins/s2member-pro/src/includes/syscon.inc.php:107) in /home/leoraver/public_html/wp-includes/pluggable.php on line 1251

Here is the screenshot, if you need it:

I have to turn off s2member to save the post/page, but when I turn it on the problem is still there.
Thanks in advance, I’m sorry to make you waste time to help me but I didn’t find anything similar in the forums.
Cheers
Leo

Hi Leo.

I can’t see the screenshot.

That line in syscon.inc.php, is about the pro_eot_reminder_email_subject. What did you enter in that field on your options page? WP Admin > s2Member > PayPal Options > EOT Reminder

Thanks.

Hi Cristian

I had EOT renewal/reminder email disabled. I tried to enable and I get the same error, I disabled again and no change. Here is the screenshot (the dropbox link was removed from my post after a while)

Thanks again
Leo

Thank you for the update, Leo.

Okay, I’m not having someone else experiencing this, so something particular to your setup seems to be causing the problem.

Could you test for plugin or theme conflict? If you can reproduce it while logged in as the administrator, this plugin might help troubleshoot deactivating other stuff to see if the behavior changes: https://wordpress.org/plugins/health-check/

Otherwise, you can just disable other plugins and go to the default theme, to try reproduce the behavior with less variables, and identify the culprit.

I look forward to your update. :slight_smile:

Hello Cristian
the conflict seems to be caused by “Classic Editor Plugin”. At least, when I modify a page with blocks editor enabled I don’t get the error message.

Since s2member custom capabilities are not available in block editor, I can’t disable Classic Editor Plugin.

I guess many s2member users (if not all of them) have the classic editor installed, but nobody has this issue except me.

Any idea?

Thanks again for your help

Hi Leo.

Thanks for the update.

You don’t see the Custom Capabilities field in the s2Member section of the new Page Editor? I don’t use the Classic Editor, and I still see the s2Member fields for Level and Custom Capability restrictions.

Screenshot_2019-11-09%20Edit%20Page%20%E2%80%B9%20s2Member%20Membership%20Plugin%20for%20WordPress%20%E2%80%94%20WordPress

Could you show me a screenshot?

:slight_smile:

Hello Cristian, I always thought that S2member and the new gutenberg editor were not compatible. I’m glad to discover they aren’t.

Sadly, I use custom posts that don’t seem to be affected by gutenberg and they are still affected by the error message, even with classic editor disabled.

Since it seems to be something related only with my website, I’ll stay with this error message. I can’t expect you to solve issues like this on each website that use S2member.

If someone else comes with a similar request, you’ll look deeper into this.
Thank you,
sincerely
Leo

Thanks for the update, Leo.

From what I read in the code, the s2 metabox is added by default unless it’s in its excluded list. s2member/src/includes/classes/meta-boxes.inc.php

There’s another thing that may interest you, and is very powerful to customize restriction to content: https://s2member.com/kb-article/custom-restriction-options-for-developers/

I hope that helps. :slight_smile: