Skip to:
Content

BuddyPress.org

Opened 20 months ago

Last modified 6 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's profile niftythree Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version: 2.4.0
Component: Messages Keywords: needs-patch
Cc:

Description

Hello,

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.

Thanks.

Attachments (2)

BuddyPress No Subject message 1.png (22.8 KB) - added by niftythree 6 months ago.
BuddyPress No Subject message 2.png (15.0 KB) - added by niftythree 6 months ago.

Download all attachments as: .zip

Change History (7)

#1 @imath
20 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
20 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
20 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).

define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', true );

#4 @imath
18 months ago

  • Milestone changed from 10.0.0 to Awaiting Contributions

We're running out of time to include this into 10.0.0, don't hesitate to submit a patch to bring some lights to this ticket. For now I'm moving it into "awaiting contributions"

#5 @niftythree
6 months ago

Hi,

Adding extra information to this ticket:

When the message "Your message was not sent. Please enter a subject line." is displayed after trying to submit a message without a subject line, it is shown again after going to another page in your account, such as the Notifications area for your account or your profile page. Presumably, this shouldn't be an issue once the suggested changes above have been applied (such as using JavaScript to intercept the form submission).

Thanks.

Note: See TracTickets for help on using tickets.