Opened 3 years ago
Closed 12 months ago
#8578 closed enhancement (fixed)
"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: | imath |
---|---|---|---|
Milestone: | 12.0.0 | Priority: | normal |
Severity: | normal | Version: | 2.4.0 |
Component: | Messages | Keywords: | has-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 (4)
Change History (14)
#1
@
3 years 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
#2
@
3 years 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
@
3 years 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
@
3 years 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
@
22 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.
#6
@
13 months ago
I was able to replicate the above issue with the legacy template. I have attached the patch and screenshot after the fixes; please check them once.
#7
@
13 months ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Contributions to 12.0.0
Hi @amitgrhr
Thanks for your patch, I'll look at it asap.
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
12 months ago
This ticket was mentioned in PR #167 on buddypress/buddypress by @imath.
12 months ago
#9
- Use a redirect to be sure to clear notice errors when a required field is missing.
- Preserve submitted texts and contacts in case of missing required fields.
- Improve the feedback message so that it informs about all missing required fields.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8578
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 :
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 😉