Project

General

Profile

Actions

Bug #7202

closed

"Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Group.class.php on line 65 Call Stack:

Added by Martin Wasley almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Start date:
02/03/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4
Affected Architecture:

Description

Problem with changes to the setHelp function or calls to it.

Actions #1

Updated by Anonymous almost 8 years ago

  • Assignee set to Anonymous

I knew there would be some :) Could you attach the call stack or tell me which page you had selected when this occured?

Actions #2

Updated by Anonymous almost 8 years ago

  • Status changed from New to Feedback
  • Assignee changed from Anonymous to Martin Wasley
Actions #3

Updated by Martin Wasley almost 8 years ago

Posted by one of my testers after patching one of mine for testing, this is what he posted,

Martin if I goto the edit gateway page (where can toggle monitoring), this appears at the top as a warning, is it related to your patch or an issue with the snapshot you think?

"Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Group.class.php on line 65 Call Stack:
0.0165 234504 1. {main}() /usr/local/www/system_gateways_edit.php:0
0.1515 2453688 2. Form_Group->setHelp()
/usr/local/www/system_gateways_edit.php:741 0.1515 2454312 3.
call_user_func_array:{/usr/local/www/classes/Form/Group.class.php:65}()
/usr/local/www/classes/Form/Group.class.php:65 0.1515 2454784 4.
sprintf() /usr/local/www/classes/Form/Group.class.php:65 Warning:
sprintf(): Too few arguments in
/usr/local/www/classes/Form/Group.class.php on line 65 Call Stack:
0.0165 234504 1. {main}() /usr/local/www/system_gateways_edit.php:0
0.1527 2458608 2. Form_Group->setHelp()
/usr/local/www/system_gateways_edit.php:761 0.1528 2459232 3.
call_user_func_array:{/usr/local/www/classes/Form/Group.class.php:65}()
/usr/local/www/classes/Form/Group.class.php:65 0.1528 2459704 4.
sprintf() /usr/local/www/classes/Form/Group.class.php:65"

Actions #4

Updated by Martin Wasley almost 8 years ago

Just double checked it's not my patch. :) Clean snapshot update shows it.

Actions #5

Updated by Anonymous almost 8 years ago

Thanks. Looks like there are a few embedded '%' that now need to be escaped, and arguments passed as an array in [ ] s.

Pushed fixes to

system_gateways_edit.php
services_dyndns_edit.php

Actions #6

Updated by Anonymous almost 8 years ago

  • % Done changed from 0 to 100
Actions #7

Updated by Dustin Dembeck almost 8 years ago

I am seeing a similar error on System -> Advanced -> Firewall & NAT

Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0051 232712 1. {main}() /usr/local/www/system_advanced_firewall.php:0 0.1040 1555888 2. Form_Input->setHelp() /usr/local/www/system_advanced_firewall.php:451 0.1040 1556608 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 0.1040 1556992 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121 Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0051 232712 1. {main}() /usr/local/www/system_advanced_firewall.php:0 0.1049 1558032 2. Form_Input->setHelp() /usr/local/www/system_advanced_firewall.php:463 0.1049 1558800 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 0.1049 1559184 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121

Actions #8

Updated by → luckman212 almost 8 years ago

Seeing the same issue as Dustin on System > Advanced > Firewall. Tested with 2.4.0.b.20170203.2002.

Actions #9

Updated by Anonymous almost 8 years ago

Fixed. Thanks for finding those. Embedded '%' that needed to be escaped.

Actions #10

Updated by Jakub Osika almost 8 years ago

SG-1000
2.4.0.b.20170204.2301

I was getting this issue on the Status Page. Can confirm that it is now resolved.

However I am still seeing error in:
System > Advanced -> Firewall & NAT
Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0361 122800 1. {main}() /usr/local/www/system_advanced_firewall.php:0 0.7140 1049040 2. Form_Input
>setHelp() /usr/local/www/system_advanced_firewall.php:451 0.7141 1049568 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 0.7142 1049784 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121 Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0361 122800 1. {main}() /usr/local/www/system_advanced_firewall.php:0 0.7171 1050272 2. Form_Input->setHelp() /usr/local/www/system_advanced_firewall.php:463 0.7172 1050848 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 0.7173 1051064 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121

Two more pages where I have noticed similar behaviour, but I'm not sure if this is pfsense or squid package specific:

Services > Squid Proxy Server > Local Cache
Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0007 122288 1. {main}() /usr/local/www/pkg_edit.php:0 2.5202 1208536 2. Form_Input->setHelp() /usr/local/www/pkg_edit.php:750 2.5203 1209272 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 2.5204 1209488 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121

Services > Squid Proxy Server > Traffic Mgmt
Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0006 122328 1. {main}() /usr/local/www/pkg_edit.php:0 5.7802 1166752 2. Form_Input->setHelp() /usr/local/www/pkg_edit.php:750 5.7804 1167104 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 5.7805 1167320 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121

Actions #11

Updated by Anonymous almost 8 years ago

System -> Advanced -> Firewall & NAT has already been fixes and will be in the next snap
The two Squid warnings were errors in the XML which I have just fixed (by escaping '%'s)
Thanks for the report.

Actions #12

Updated by Jakub Osika almost 8 years ago

I just did a click through every page that my device has and found one more for which I couldn't find an existing report:

Services > DNS Resolver > Advanced Settings
Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 121 Call Stack: 0.0257 122104 1. {main}() /usr/local/www/services_unbound_advanced.php:0 0.8624 1033880 2. Form_Input->setHelp() /usr/local/www/services_unbound_advanced.php:233 0.8626 1034320 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:121}() /usr/local/www/classes/Form/Input.class.php:121 0.8627 1034536 4. sprintf() /usr/local/www/classes/Form/Input.class.php:121

Actions #13

Updated by Anonymous almost 8 years ago

Got it. Thanks.

Actions #14

Updated by James Snell almost 8 years ago

  • System > Advanced > Firewall & NAT
  • Services > DNS Resolver > Advanced

Tested, no PHP errors displayed in build 2.4.0.b.20170205.1945
Thanks!

Actions #15

Updated by Helio Tadao Goto almost 8 years ago

Installed build 2.4.0.b.20170207-1441 and same errors appears in

  • Services > Squid Proxy Server
  • Services > SquidGuard Proxy Filter
  • Services > SquidGuard Proxy Filter > Common ACL
    In this last one, it doesn't show Target Rules List bar (the same occurs in the other tabs for Groups ACL too, what means we can't configure the blacklists allow,deny options)
Actions #16

Updated by Helio Tadao Goto almost 8 years ago

This problem remains with SquidGuard, in several tabs, like this in

Services > SquidGuard Proxy Filter > Common ACL :

Warning: sprintf(): Too few arguments in /usr/local/www/classes/Form/Input.class.php on line 122 Call Stack: 0.0002 231312 1. {main}() /usr/local/www/pkg_edit.php:0 0.1428 2742320 2. Form_Input->setHelp() /usr/local/www/pkg_edit.php:750 0.1428 2742768 3. call_user_func_array:{/usr/local/www/classes/Form/Input.class.php:122}() /usr/local/www/classes/Form/Input.class.php:122 0.1429 2743152 4. sprintf() /usr/local/www/classes/Form/Input.class.php:122

Actions #17

Updated by Anonymous almost 8 years ago

  • Assignee changed from Martin Wasley to Anonymous
Actions #18

Updated by Anonymous almost 8 years ago

Fixed embedded '%' in squidguard.inc

Actions #19

Updated by Anonymous almost 8 years ago

This problem has now been fixed in a more generic within the Form classes so there should be no other cases, with or without embedded '%' characters.

https://github.com/pfsense/pfsense/commit/c74b018d42c02e0ee4e4a25e61db654c9f6caf63

Actions #20

Updated by Helio Tadao Goto almost 8 years ago

I navigated in almost all screens previously affected and can confirm everything is fixed with the pages previously affected.

Actions #21

Updated by Anonymous almost 8 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF