Users reported that drafts are not being saved when creating a new private message (PM), even after selecting “No, save draft” in the confirmation dialog. Thomas_G initially suspected a bug, noting that drafts under 20 characters (the min post length setting) might not be saved — but observed that short topic drafts were saved, creating confusion. tshenry confirmed the issue and found it’s tied to timing and field interaction: drafts save if only title or only body is filled, but fail if both are filled quickly — even if one exceeds minimum length. Thomas_G verified this and suggested improving the UI to avoid misleading users into thinking drafts will be saved when they won’t. sam acknowledged it as a minor bug. techAPJ later confirmed the issue was fixed via a commit that simplifies draft-saving logic: drafts are now saved if either the title or reply meets minimum length requirements, regardless of the other field. The fix resolves the inconsistency and improves user clarity.
When creating a message and saving it as a draft, the message does not appear in Drafts
Steps to reproduce:
Open Messages
Press New Message
Type something
Press the little icon as shown in the video below.
Start a new message
A notification then should pop up saying: Are you sure you want to delete the message?
Press No, save draft
Go to the drafts section. The draft is not there.
Although the fact, that you want to create a new message when you are already in the process of creating a new one, seems a bit weird, shouldn’t the draft feature work just fine?
I can, but I think it may be expected. From what I can tell a draft will not save unless it meets the criteria set in the min post length site setting (default 20 characters).
IMO if a draft is < 20 characters, it’s probably not hyper-critical if a user has to start from scratch. I guess the only thing we could improve here is to not give the user the impression that a draft will be saved.
Tried both of those and yes, you are right. Entering another phrase though which is 19 characters, the pop up message still appears and when you press save draft, the draft is not saved. As you said, the notification should be improved a litle, in order for members not to understand that their draft will be saved. Perhaps, the message shouldn’t even pop up, if the characters are <20. Thanks for looking into it!
Here’s how the draft saving process works currently:
if only title is present (no reply) the draft is saved
if only reply is present (no title) the draft is saved
if both title and reply are present, and reply length is less than min_post_length and the title length is less than min_topic_title_length , then the draft is saved
if both title and reply are present, and reply length is less than min_post_length , then the draft is not saved (then why the above case was saved? )
The current draft saving conditions are complex to understand and is causing confusion.
This commit updates the process to save the draft if either title or reply (or both) exists and at least one of them meets required length criteria.
Thanks for reporting this issue @Thomas_G, and for further researching @tshenry.