[#7801] sprintf warning when saving page
Summary sprintf warning when saving page
Queue Wicked
Type Bug
State Not A Bug
Priority 1. Low
Requester lfbm.andamentos (at) gmail (dot) com
Created 2008-12-23 (3742 days ago)
Updated 2008-12-23 (3742 days ago)
Resolved 2008-12-23 (3742 days ago)
Patch No

2008-12-23 22:33:56 lfbm (dot) andamentos (at) gmail (dot) com Comment #6 Reply to this comment
I've filed a bug report against the PEAR package:


A temporary workaround would be to change line 134 of Wikilink.php to:

$href = sprintf(substr_replace($href, ereg_replace("%", 
"%%",substr($href, strpos($href, '%')+1)),strpos($href, 

This will cause every % sign after the first one to be escaped (%%).

2008-12-23 16:11:08 Chuck Hagenbuch Comment #5
State ⇒ Not A Bug
Reply to this comment
The bug is in text_wiki, a PEAR package, not in Wicked.
2008-12-23 14:24:56 lfbm (dot) andamentos (at) gmail (dot) com Comment #4 Reply to this comment
The trouble is not with the page I attached.

The problem is the "referrer" or "page name". I was using "Tributário" 
in the previous page, like this:


Then, when you click on it, it turns to "Tribut%C3%A1rio" and the 
sprintf lines get like this:


(Line 134 - /usr/share/pear/Text/Wiki/Render/Xhtml/wikilink.php)

Then, I think php complains about the lack of arguments due to the "%" 

If I use "Tributario" instead of "Tributário" as the page name, then 
it works...

In other words, I can´t create wiki links with special characters like 
á, é, ó etc., because the wiki links on the created pages will be broke.

I don´t know if it´s not a wicked issue and I´m sorry in advance if 
this is the case. Please provide orientation so I can report the bug 
on the right place.

2008-12-23 13:09:28 lfbm (dot) andamentos (at) gmail (dot) com Comment #3
New Attachment: tributario.wiki.txt Download
Reply to this comment
Attached is the page generating the warnings.
2008-12-23 13:02:54 lfbm (dot) andamentos (at) gmail (dot) com Comment #2 Reply to this comment
It´s actually preventing me from opening internal links now.

I´m getting the same warning 12 times when I click on a internal link 
and instead of being asked to create the page, I return to the same 

I´m using MediWiki as [wicked][format].

2008-12-23 12:07:27 lfbm (dot) andamentos (at) gmail (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ sprintf warning when saving page
Queue ⇒ Wicked
Milestone ⇒
Patch ⇒ No
Reply to this comment
Horde: 3.3.3-cvs

Wicked: 1.0-cvs

This happens when I edit a page and click "save":

( ! ) Warning: sprintf() [function.sprintf]: Too few arguments in 
/usr/share/pear/Text/Wiki/Render/Xhtml/Wikilink.php on line 134

Call Stack

#        Time        Memory        Function        Location

1        0.0008        142480        {main}( )        ../display.php:0

2        0.0402        3165472        Page->render( )        ../display.php:136

3        0.0402        3165472        Page->display( )        ../Page.php:508

4        0.0402        3165472        StandardPage->displayContents( )        ../Page.php:358

5        0.0459        3563592        Text_Wiki->transform( )        ../StandardPage.php:102

6        0.0550        4017424        Text_Wiki->render( )        ../Wiki.php:918

7        0.0576        4149312        preg_replace_callback ( )        ../Wiki.php:1012

8        0.0582        4150768        Text_Wiki->_renderToken( )        ../Wiki.php:0

9        0.0582        4150768        Text_Wiki_Render_Xhtml_Wikilink->token( )        ../Wiki.php:1128

10        0.0583        4150768        sprintf ( )        ../Wikilink.php:134

Screenshot: http://img71.imageshack.us/img71/7581/wickedwarningwd8.jpg

Saved Queries