Make WordPress Core

Opened 15 years ago

Closed 9 years ago

#10790 closed defect (bug) (worksforme)

No feedback given to commenter when "Name" field empty

Reported by: wk1's profile WK1 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.4
Component: Comments Keywords: close
Focuses: Cc:

Description

On my installation, name and email are not required to post a comment. I must approve every comment before it appears. If a user chooses to give their name anyway, then after they post their comment, they get a screen that says "Blah says:" and below that "Your comment is awaiting moderation." This is expected behavior.

However, if the user does not give their name, then they do not get any sort of confirmation that their comment was sent. It is sent successfully, but the user should have confirmation, otherwise they will likely try more than once before giving up in frustration.

I have tested this bug using Firefox 3.0, with and without JS enabled, and Internet Explorer 6.

Attachments (3)

comment-template.php.diff (1.0 KB) - added by secondv 15 years ago.
10790.diff (1.6 KB) - added by solarissmoke 14 years ago.
10790-2014-07-31.diff (1.5 KB) - added by asannad 10 years ago.
Updated patch against WP 3.9.1

Download all attachments as: .zip

Change History (14)

#1 @scribu
15 years ago

  • Milestone changed from Unassigned to 2.9
  • Summary changed from Wordpress is silent when user posts a comment without filling in "Name" field, name field is not required, and comment requires moderator approval. to No feedback given to commenter when "Name" field empty

#2 @azaozz
15 years ago

  • Milestone changed from 2.9 to 3.0

No patch.

#3 @secondv
15 years ago

  • Cc secondv added
  • Keywords has-patch needs-testing added

#4 @secondv
15 years ago

Oh, probably important to note, this was patched against r12781

#5 @scribu
15 years ago

Please explain how your patch fixes the current bug, as I fail to understand it.

And why do you pass an empty string to $wpdb->prepare() ?

#6 @secondv
15 years ago

It fixes the bug, because WordPress does not query pending comments if the Comment Author is blank/anonymous, which means when redirected back to the post/#comments - you get no confirmation that your comment was sent through.

As far as $wpdb-prepare, that actually could be changed. Will attach a new patch when I've tested the change.

#7 @dd32
15 years ago

  • Keywords needs-patch added; has-patch needs-testing removed
  • Milestone changed from 3.0 to Future Release

This patch isn't safe, by removing the approved status check, you're allowing for non-approved comments to be seen by users with blank usernames, that includes their posts, and any others that there may be.

Moving to Future Release as this isnt a regression from a previous version and we dont have a usable patch

@solarissmoke
14 years ago

#8 @solarissmoke
14 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

This patch shows recent anonymous comments from the current visitor (best guess at least). It does however mean abandoning the get_comments API and making the query a lot more complicated... is it worth it?

@asannad
10 years ago

Updated patch against WP 3.9.1

#9 @asannad
10 years ago

Attached patch( 10790-2014-07-31.diff ) is updated patch of 10790.diff against WP 3.9.1. I am facing same issue and I think this is good way to fix.

#10 @chriscct7
9 years ago

  • Keywords close added; dev-feedback removed

In WordPress core, if the name field isn't filled in, it will first be blocked by the browser with an alert they need to fill it in, and even if JS is off, it will be blocked by a WP_Error that says "please fill the required fields". As such, the bug on this ticket is not a standard, supported behavior in WordPress but one that someone has added. Therefore, the plugin being used to enable this functionality should be responsible for the issues that arise from this non-core behavior.

#11 @rachelbaker
9 years ago

  • Keywords has-patch removed
  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.