Make WordPress Core

Opened 4 months ago

Last modified 3 months ago

#62684 new defect (bug)

With WordPress Editor - an empty comment is possible - It should show error

Reported by: mdibrahimk48's profile mdibrahimk48 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.7.1
Component: General Keywords:
Focuses: Cc:

Description

Attempting to submit an empty column does not work. However, when using the WordPress editor, removing text in a comment is possible without issues.

✅ - When Trying to submit an empty comment: https://prnt.sc/eH6-zdudB8tX
❌ - Editing a comment: (Empty Comment Possible here)

  1. https://prnt.sc/VhRWi1CmXI6I
  2. https://prnt.sc/W4c8a7CmDp4F

Attachments (1)

WP_Bug_Comment.png (34.9 KB) - added by mdibrahimk48 4 months ago.

Download all attachments as: .zip

Change History (4)

#1 @abcd95
3 months ago

  • Keywords needs-testing removed

Hi @mdibrahimk48, Thanks for reporting this!

I was able to reproduce the issue - while empty comments are blocked during initial submission, they can be saved when editing existing comments. I'll first check if there are any existing tickets addressing this inconsistency. If not, I'll work on implementing a fix to ensure consistent validation in both cases.

#2 @mdibrahimk48
3 months ago

Hello @abcd95,

Thanks for your update!

#3 @abcd95
3 months ago

Hey @mdibrahimk48,

After investigating, I found that this is actually an intended behavior. While new comments can't be empty, allowing edited comments to be empty serves specific moderation purposes.

References - https://core.trac.wordpress.org/ticket/58168#comment:4, #62066, #58168

So this difference in behavior is by design - it provides moderators with flexibility to handle problematic content while maintaining comment records when needed.

Please feel free to ask any questions you may have.

Note: See TracTickets for help on using tickets.