Opened 9 years ago
Last modified 8 years ago
#6668 reopened defect (bug)
Better compatibility when using 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' and UTF-8
Reported by: | silu44 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | high |
Severity: | normal | Version: | 1.1 |
Component: | Core | Keywords: | |
Cc: |
Attachments (1)
Change History (17)
#3
@
9 years ago
here is the code that print the user name :
<span class="user-nicename">@<?php bp_displayed_user_username(); ?></span>
#4
@
9 years ago
@silu44
How did you *register* a user name of "رماح" in WordPress?
When I try adding a user through /wp-admin/user-new.php
, it won't create the user account.
#5
@
9 years ago
@DJPaul i'm using :
Buddypress + Wordpress Special Characters in Usernames + Paid Memberships Pro
those are the plugins related to my post ,
#6
@
9 years ago
- Keywords has-patch added
- Version changed from 2.3.3 to 1.9
It looks like we need to run urldecode()
on the mention name function.
I'm proposing we add the filter needed to make this work, and then a 3rd-party plugin can run the urldecode()
function on this filter:
add_filter( 'bp_activity_get_user_mentionname', 'urldecode' );
Edit: This will fix the mention name display, but we would probably need to fix bp_activity_find_mentions()
so it checks url-encoded values as well.
#7
@
9 years ago
Maaaybe. We can add a filter, sure, but I think would probably want more unit tests to ensure everything's consistent with the parsing and display of these.
At any rate, since the Special Character plugin allows different characters in the username/nicename, I'm tempted to suggest the best quickest fix is to enable BP_ENABLE_USERNAME_COMPATIBILITY_MODE
where we already handle URL decoding.
#8
@
9 years ago
- Keywords needs-patch added; has-patch removed
I'm tempted to suggest the best quickest fix is to enable BP_ENABLE_USERNAME_COMPATIBILITY_MODE where we already handle URL decoding.
Good point. We (or a plugin) would still need to apply urldecode()
to various spots that generate a user profile URL so the member profile will resolve properly:
add_filter( 'bp_get_member_permalink', 'urldecode' );
Needs further auditing.
#9
@
9 years ago
- Keywords needs-testing added
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
nothing of the mentioned solutions solved the problem.
#10
@
9 years ago
silu44 - For now, you can add the following to wp-content/plugins/bp-custom.php:
// Enable username compatibility define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true ); // URL decode member permalinks on the Members Directory page add_filter( 'bp_get_member_permalink', 'urldecode' );
This probably will not solve 100% of the issues, but it should get you partially there. If you do encounter other bugs, please let us know.
#11
@
9 years ago
- Keywords needs-patch needs-testing removed
thanks @r-a-y it works fine for me, everything is good now .
i can register with arabic username and nicename
i can view user profile normaly
user permalink is fine .
1-just the user with arabic name not showing up on ( members page or search result )
on localhost it works good , but online not working :
2-when trying to activate user account it say ( can't activate "username" - the sign-up has already been activated. ) and user deleted
#12
@
9 years ago
- Milestone set to 2.5
- Resolution wontfix deleted
- Status changed from closed to reopened
- Summary changed from Strange characters on @username when using arabic to Better compatibility when using 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' and UTF-8
- Version changed from 1.9 to 1.1
Going to reopen this.
I think if BP_ENABLE_USERNAME_COMPATIBILITY_MODE
is set to true, we should automatically add various filters like the 'bp_get_member_permalink'
filter and fix up various things like the activation issue as stated in comment:11.
I'll try and look into these things in 2.5.
Hello @silu44
Please can you give me a sample Arabic username that causes this problem? It will help us check the bug. Thanks.