[wp-trac] [WordPress Trac] #18813: Media Buttons missing with non english URL-s

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 29 11:07:42 UTC 2011


#18813: Media Buttons missing with non english URL-s
--------------------------+-----------------------------
 Reporter:  mangus        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  3.2.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 == Description ==

 In add post/page editor there are no "Upload/Insert" buttons, but there is
 PHP error message under other editor buttons:

 {{{
 Warning: printf() [function.printf]: Too few arguments in
 /home/idnetee/lisadomeenid/parmu.ee/ökoküla/wp-admin/includes/media.php on
 line 400
 }}}

 == How to reproduce ==

 * Wordpress 3.2.1 (tested with Estonian version).
 * URL encoded non english site aadress (for example
 http://parmu.ee/%C3%B6kok%C3%BCla -- without URL encoding Wordpress can't
 handle it -- http://parmu.ee/ökoküla)
 * A plug-in, that uses site URL in 'media_buttons_context' (for example "1
 Flash Gallery")
 * Go to add new post and there are no "Insert/Upload" buttons but an error
 message.

 == Possible solution ==

 Not a nice solution, but it works.

 Line 400 in media.php:
 {{{
 printf($context, $out);
 }}}

 Replace it:
 {{{
 echo str_replace(' %s', ' ' . $out, $context);
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18813>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list