Summary | sprintf warning when saving page |
Queue | Wicked |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | lfbm.andamentos (at) gmail (dot) com |
Created | 12/23/2008 (6015 days ago) |
Due | |
Updated | 12/23/2008 (6015 days ago) |
Assigned | |
Resolved | 12/23/2008 (6015 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
http://pear.php.net/bugs/bug.php?id=15385
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,
'%')+1),$this->urlEncode($page));
This will cause every % sign after the first one to be escaped (%%).
State ⇒ Not A Bug
The problem is the "referrer" or "page name". I was using "Tributário"
in the previous page, like this:
[[Tributário]]
Then, when you click on it, it turns to "Tribut%C3%A1rio" and the
sprintf lines get like this:
sprintf(/wicked/display.php?page=%s&referrer=Tribut%C3%A1rio,
Parcelamento_Generico);
(Line 134 - /usr/share/pear/Text/Wiki/Render/Xhtml/wikilink.php)
Then, I think php complains about the lack of arguments due to the "%"
signs...
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.
Thanks
New Attachment: tributario.wiki.txt
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
page.
I´m using MediWiki as [wicked][format].
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ sprintf warning when saving page
Queue ⇒ Wicked
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
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