Skip to:
Content
Pages
Categories
Search
Top
Bottom

Auto-Complete Usernames is Broken After 1.9 Upgrade


  • drrxa
    Participant

    @drrxa

    Using WordPress 3.8 and BuddyPress 1.9

    After upgrade to BP 1.9, the message usernames auto-complete functionality stop working properly.

    In my install I allow Arabic characters in usernames using sanitize_user filter, and allowing BP username compatibility mode:

    
    add_filter('bp_is_username_compatibility_mode', '__return_true');
    

    The problem is when start typing a name in Arabic, the menu will show the encoded username, something like this:

    
    (%D8%B3%D8%A7%D9%85%D8%B1)
    

    while in previous version is showed the name correctly, like:

    
    (سامر)
    

    and when clicking on the name it will not choose it as before, instead I get error in console (firebug console):

    
    Error: Syntax error, unrecognized expression: #un-%D8%B3%D8%A7%D9%85%D8%B1
    

    I am using child theme of bp-default theme, and the problem caused by line 986 on bp-default/_inc/ajax.php where urlencode is applied to usernames

    
    $username = urlencode( $ud->user_login );
    

    I think this will apply to all non-English (and non-Latin?) characters if allowed in WP usernames.
    I am aware I can fix that in my case by overriding bp_dtheme_setup() function and include my own copy of ajax.php file which will not apply urlencode to usernames, but I really don’t want to do that and wish to continue using parent ajax.php.

    Thanks.

  • The topic ‘Auto-Complete Usernames is Broken After 1.9 Upgrade’ is closed to new replies.
Skip to toolbar