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

WordPress Trac noreply at wordpress.org
Wed May 9 18:21:43 UTC 2018


#43857: Show the comment / awaiting moderation message even without opt-in
------------------------------------------+---------------------
 Reporter:  imath                         |       Owner:  (none)
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  4.9.7
Component:  Comments                      |     Version:  trunk
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch gdpr needs-testing  |     Focuses:
------------------------------------------+---------------------

Comment (by imath):

 @allendav Thanks for looking at this bug. I really appreciate your
 consideration.

 FYI [https://core.trac.wordpress.org/attachment/ticket/43857/43857.patch
 43857.patch] was leaving the form filled for next comments, and
 [https://core.trac.wordpress.org/attachment/ticket/43857/43857.2.patch
 43857.2.patch] is fixing that form-fill-in.

 Then, sorry but I'm not sure to understand your plan for this late stage.
 If I rephrase does this mean :

 1. Introduce a filter that would prevent the opt-in checkbox about cookies
 consent to be displayed on the comment form
 2. Store cookies to make sure the awaiting moderation message is still
 displayed to the user so that he sees his comment was saved but make sure
 the form is emptied for next comments ?

 I think 1. can already be achieved filtering `comment_form_default_fields`
 and 2. seems a weird behavior to me because it looks like hiding cookies
 are saved so i'm probably misunderstanding.

 Options i see :

 1. If losing the information "your comment is awaiting moderation" is
 **not** a regression for comment authors, then fine, let's just remove the
 [https://core.trac.wordpress.org/browser/trunk/src/wp-comments-
 post.php#L55 anchor to the comment that is appended to the redirect URL]
 when `! $cookies_consent`. Because it leads to nowhere in the comments
 list of the loaded page.

 2. If losing the information "your comment is awaiting moderation" **is**
 a regression for comment authors :
 - the comment ID needs to be added as a query var to the URL so that it's
 possible to include the comment at next page load (for example the
 attached
 [https://core.trac.wordpress.org/attachment/ticket/43857/43857.2.patch
 43857.2.patch]).
 - or you can `wp_die( '<p>Your comment is awaiting moderation</p>',
 'Comment awaiting moderation', array( 'back_link' => true ) );`

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


More information about the wp-trac mailing list