Error “too few arguments in…”
-
I’ve just installed this plugin and after activation I get error messages in top of pages as on the attached pictures. What could be wrong?



-
That’s odd. We haven’t had any other reports of this, and I haven’t seen it myself on any of our test sites.
Is everything fine after the initial install, or is the plugin constantly causing all of these notices to be output?
The initial install runs fine but the notices appear when activating and then continue to sppear on all pages within the admin console for WordPress. I do not see them as a guest. Have you got a clue what could cause errors like this? I have 40-ish different plugins and prefer not to tweak or disable among them before I can get a hint about where to start as this is a site in production.
Well, “40-ish different plugins” is probably your answer. That’s a lot of plugins, and the odds of something conflicting are very good.
I’ve now found the one plugin that your plugin is conflicting. It is the “WooCommerce PDF Invoices & Packing Slips” “Version 1.6.0.2 | By Ewout Fernhout”. I’ve used that plugin for almost a year and it works flawless in relation to all other plugins. Could you please verify what may be causing this conflict?
Hmmm…interesting. I use that plugin myself, but it looks like I’m still on 1.5.39. I see they just recently released their latest updates. Would you be able to revert back to their 1.5.39 to see if the issue goes away?
I’ll update my test site to their new 1.6.0.2 a little later, but I’m not at a computer I can easily do that with right now.
We have tested this using the latest version of our plugin and the PDF Invoices plugin, but we are unable to reproduce the error. We’re going to close this ticket, but if you continue to have this problem let me know and we can look into it more. I think the latest versions of things will fix it.
This problem persist and nothing has changed for the better. I am not a developer but looked into the referred code and by following the error messages I think that you would be able to trace the cause. The only way for this to work here is by disabling the “WooCommerce PDF Invoices & Packing Slips” which is an essential plugin for us to use. All plugins and other patches are up to date!
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-offer-email.php on line 145 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-offer-email.php on line 152 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-counter-offer-email.php on line 145 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-counter-offer-email.php on line 152 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-offer-received-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-offer-received-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 137 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 144 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-on-hold-email.php on line 136 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-on-hold-email.php on line 143 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-note-email.php on line 136 Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-note-email.php on line 143
Hi, @restoredse,
Did you try our recent update 1.4.7 which was released yesterday? Can you please update to the latest version and see if that helps. Please make sure to clear any browser/plugin and CDN caches after the update.
Please check that and let me know if you still have any questions/concerns.
CheersYes, I’ve tried that and the most current 1.4.7.2 without success. I have not rated your software yet but I’m getting frustrated and am close to give it a really low grade. Especially since you flag this issue as a solved case, which it most definately is not…
The first error line says: “Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-offer-email.php on line 145”.
Looking at line 145 of class-wc-new-offer-email.php it says “‘description’ => sprintf( __(‘This controls the email subject line. Leave blank to use the default subject:’, ‘offers-for-woocommerce’) . ‘
%s.’, $this->subject ),Clearly it says that there are too few arguments in something controlling the subject line where a new e-mail is to be created regarding a new offer.
The second error refers to line 152 in the same file, saying ‘description’ => sprintf( __(‘This controls the main heading contained within the email notification. Leave blank to use the default heading:’, ‘offers-for-woocommerce’) . ‘
%s.’, $this->heading ),This goes on file by file like below examples.
TOO FEW ARGUMENS FOR SUBJECT LINES:
class-wc-new-offer-email.php on line 145
class-wc-new-counter-offer-email.php on line 145
class-wc-offer-received-email.php on line 137TOO FEW ARGUMENS FOR E-MAIL MAIN HEADINGS:
class-wc-new-offer-email.php on line 152
class-wc-new-counter-offer-email.php on line 152
class-wc-offer-received-email.php on line 144So, there are some conflicts regarding Subject Lines and E-mail Main Headings…
Could you please take it from here?Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-offer-email.php on line 145
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-offer-email.php on line 152
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-counter-offer-email.php on line 145
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-new-counter-offer-email.php on line 152
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-offer-received-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/public/includes/class-wc-offer-received-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-accepted-offer-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-declined-offer-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 137
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-countered-offer-email.php on line 144
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-on-hold-email.php on line 136
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-on-hold-email.php on line 143
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-note-email.php on line 136
Warning: sprintf(): Too few arguments in /storage/content/03/195003/restored.se/public_html/wp-content/plugins/offers-for-woocommerce/admin/includes/class-wc-offer-note-email.php on line 143
We are not seeing any other reports of this, our code editor (PHPStorm) does not throw any warnings of missing parameters, and we are not able to reproduce this problem on our servers. You can see on one of our test sites, http://woo.angelleye.com/shop, that no error is occurring and we have the latest version of our plugin and the PDF Invoices & Packing Slips plugin. We also have full error reporting enabled, and we simply are not able to reproduce this problem.
Given those facts, I’m curious what version of PHP you are running. Can you please check that?
Also, for future reference, threatening a bad review isn’t going to make us eager to help you figure this out. Remember, this is a free plugin and we’ve been spending a lot of time on this issue already even though we can’t reproduce it and we don’t have any other reports of it.
Dear @angeleye! I’m sorry if you saw that as threatening, it wasn’t my intention. I’ve checked the uunning PHP version: 5.6.30. I googled similar error messages and found another plugin having a similar issue. That showed to be a language incompatibility issue. I made a quick switch from Swedish to English site language and the error messages disappeared. I do need to run native Swedish language for my customers living in Sweden. Hope that this may be of assistanve for solving this problem.
Best Regards
SvenInteresting. So you just made that change within the WooCommerce settings, or is that server specific setting?
It’s not a WooCommerce setting but an overall WordPress setting under “Settings|General Settings|Site Language”. It changes the language for the entire site.
Maybe you can re-create the error if you use the WooCommerce PDF Invoices & Packing Slips plugin and change the language to Swedish?!Yes, we’ll give that a try and make any necessary adjustments. I’ve added this to our GitHub repo and I’ll update you again here once this particular issue resolved.
Thanks, can you make an estimation, a wild guess? I’m not visiting this forum regulary so It would be of help knowing just about when to return so the case will not be closed without my knowledge.
Best Regards
Sven
The topic ‘Error “too few arguments in…”’ is closed to new replies.