#3573 closed defect (bug) (no action required)
BP 1.5 - Auto Complete of to: field when sending private message
Reported by: | simon_said | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Messages | Keywords: | dev-feedback |
Cc: |
Description
Installation of BP 1.5 (vs. Beta 3) over top of a vanilla BP ( vs. 1.2.9). Followed the installation wizard... worked great.
When sending a private message the autocomplete does not always fill in correctly. Friends and activity stream has been turned on / off to see if there is any intereference and still no success.
Scenario is…Private messaging does not always autocomplete when clicking on “private message” in the users profile.
User A clicks on the private message button and autocomplete shows correctly
User B clicks on the private message button for USER A and autocomplete shows correctly
User B clicks on the private message button for USER C and autocomplete does NOT show
All of these users have the same role, and being a “friend” with each other has no effect to this scenario.
Here's a link with some feedback from Paul and Boone
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/bp-1-5-bugs-with-private-messaging-autocomplete/
Attachments (1)
Change History (8)
#2
@
13 years ago
Ideally we should switch everything to using WP_User_Query eventually, which is new since 3.1 and does the work for us.
I'm weary to changing this function so late in RC. Maybe introduce a new function specifically for PM's to search both, make it use WP_User_Query, and we can audit this in 1.6.
#3
@
13 years ago
P.S. - Any danger of a user_login and user_nicename being the same and /not/ belong to the same user ID?
Went on a hunt and didn't come up with a definitive yes/no.
If there is absolutely no danger, meaning WordPress core prevents this, then the above patch is probably sound.
#4
in reply to:
↑ 1
@
13 years ago
Replying to boonebgorges:
Devs - we could also be a bit more generous in some of our core functions, and be a bit more generous about the distinction between username compatibility mode on and off. See 3573.01.diff for an example of what I mean. FWIW I think that we probably should implement something like 3573.01.diff in any case, since at the moment bp_core_get_userid() is not compatible with _USERNAME_COMPATIBILITY_MODE.
Which is why we use bp_is_username_compatibility_mode() alot to switch between bp_core_get_userid() and bp_core_get_userid_from_nicename() appropriately. See something like bp_core_get_userlink_by_username() for a trivial example. Rather than mess with the SQL at this release, it's probably better just adding this sort of conditional in private messaging wherever this problem occurs.
I don't think messing with bp_core_get_userid() is a good idea this late in the game. That could be done separately for 1.6.
#5
@
13 years ago
- Resolution set to invalid
- Status changed from new to closed
I don't think we should change anything for 1.5. (Was never suggesting that :) ) BP_ENABLE_USERNAME_COMPATIBILITY_MODE will work fine with the user's original question. And if Paul is right, then bp_core_get_userid() doesn't need to be _USERNAME_COMPAT compatible, because it's not used.
Closing this ticket as invalid. We can catch these things in 1.6 if we refactor for WP_User_Query.
The problem arises when the username has periods in it. By default, BuddyPress uses user_nicename (rather than user_login) when referencing users. WordPress does not allow periods in the user_nicename column.
The immediate answer is to put the following in your wp-config.php file, which will solve the problem:
Devs - we could also be a bit more generous in some of our core functions, and be a bit more generous about the distinction between username compatibility mode on and off. See 3573.01.diff for an example of what I mean. FWIW I think that we probably should implement something like 3573.01.diff in any case, since at the moment bp_core_get_userid() is not compatible with _USERNAME_COMPATIBILITY_MODE.