WordPress.org

Support

Support » Plugins and Hacks » Responsive Select Menu » Problem with cyrillic letters

Problem with cyrillic letters

  • Sami Keijonen

    @samikeijonen

    Member

    Hi.

    When using cyrillic letters letters (like in russia) in page name I get this warning and naturally select menu doesn’t work.

    Warning: sprintf() [function.sprintf]: Too few arguments in /wp-includes/nav-menu-template.php on line 246

    Any ideas to fix this? When changing to page slug something that is not cyrillic letters seems to work but is there any other way.

    http://wordpress.org/plugins/responsive-select-menu/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author sevenspark

    @sevenspark

    Hi Sami,

    Thanks for the info. I’ve investigated this and found that the issue is that the cyrillic characters are escaped in the URL, leaving strings like %d. This is then interpreted by sprintf as an argument, and the function throws an error.

    Here’s a potential solution: in responsive-select-menu.php, find line 551, which should look like this:

    $attributes = ' value="' . esc_attr( $item->url ) .'"';

    Add this line before it:

    $item->url = urldecode( $item->url );

    This will unescape the values and should allow the menu to render properly. The only question is whether this will cause other issues by having non-escaped characters in your URLs

    Hope that helps!

    Chris

    couldn’t find
    $attributes = ' value="' . esc_attr( $item->url ) .'"';
    in responsive-select-menu.php, i have a newer version perhaps?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with cyrillic letters’ is closed to new replies.
Skip to toolbar