Skip to:

Opened 2 months ago

Last modified 2 months ago

#8578 new enhancement

"Send To" field text/recipient of new message thread cleared when user attempts to send message without a "Subject" or "Message" text

Reported by: niftythree Owned by:
Milestone: 10.0.0 Priority: normal
Severity: normal Version: 2.4.0
Component: Messages Keywords: needs-patch



We've noticed that if a user attempts to start a new message thread, but doesn't include a "Subject" or any content within the "Message" field, and attempts to send the message, then the "Send To" text/recipient will be cleared.

We're using BuddyPress version 9.1.1 and the Legacy template pack. We've tested this on a clean install, with no other plugins, and using a default WordPress theme.


Change History (3)

#1 @imath
2 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 10.0.0
  • Type changed from defect (bug) to enhancement
  • Version changed from 9.1.1 to 2.4.0

Hi thanks for your feedback. The reason is if these two post variables are empty we stop the sending process and redirect the user to the same screen.

I agree it's a bit annoying to have to retype the conversation participants. So it could be improved :

  • using JavaScript to intercept the form submission and interrupt it if the corresponding field are missing if it's not a sitewide notice.
  • From the bp_messages_action_create_message() function adding query vars containing the usernames to the redirection URL.

Who wants to submit a patch! I'd be happy to review it and help you have it committed 😉

#2 @niftythree
2 months ago

Hi @imath

Thanks for your response and the information.
We've found it's mostly problematic if you have the "Friend Connections" Component of BuddyPress turned off, because then you can't type a username into the "Send To" field, and have to relocate the user's profile to start the message again.

Thanks. 🙂

#3 @imath
2 months ago

Hi @niftythree

FYI you can add the following constant to your wp-config.php file to perform the autocomplete Ajax action on all users (not only friends).

Note: See TracTickets for help on using tickets.