[wp-trac] [WordPress Trac] #43857: Show the comment / awaiting moderation message even without opt-in

WordPress Trac noreply at wordpress.org
Mon Jan 14 04:19:10 UTC 2019


#43857: Show the comment / awaiting moderation message even without opt-in
-------------------------------------+-----------------------
 Reporter:  imath                    |       Owner:  (none)
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  5.1
Component:  Privacy                  |     Version:  4.9.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:
-------------------------------------+-----------------------
Changes (by pento):

 * keywords:  has-patch => has-patch needs-refresh
 * owner:  pento => (none)


Comment:

 I've tested [attachment:"43857.7.diff"] a bit, here are the issues I ran
 into:

 - When permalinks are set to `Plain`, the URL after posting a comment
 looks like this: `http://localhost:9999/?p=169?p=169#comment-16`
 - The "''Your comment is awaiting moderation.''" message should be updated
 to note that they'll only see this message once.

 Generally, I have a few concerns about the patch itself:

 - `wp_remove_feedback_query_args()` seems like overkill. Is there a
 benefit to remove the hash from the URL, apart from looking nice?
 - The logic in `wp_get_current_commenter()` is confusing. It seems to
 setting a current commenter so that `wp_list_comments()` will load the
 appropriate comment, but it's also setting a flag so that `comment_form()`
 doesn't show those commenter details in the comment form after submitting
 a comment? It seems like this bit of logic to detect the commenter should
 really only happen in `wp_list_comments()`, as that's the only place we
 want to know about this commenter.
 - There are no unit tests. See `commentForm.php` and
 `commentsTemplate.php` for examples.

 And some minor issues:
 - There are a handful of typos and code formatting issues. Please run
 `composer run format` on the changed files, to ensure they're correct.
 - When comparing the hash, please use `hash_equals()` rather than `===`.

 I'm happy to leave this ticket in 5.1 for now.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43857#comment:74>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list