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

WordPress Trac noreply at wordpress.org
Sat Jan 19 12:34:14 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     |     Focuses:
--------------------------+-----------------------

Comment (by azaozz):

 Seems we've been looking at this at the same time :)

 43857.8.diff looks a lot better. The only thing remaining would be to
 remove use of comment cookies for this functionality completely, consent
 or no consent.

 Also, to avoid dealing with canonical URLs it may be possible to use the
 hash part of the URL when redirecting. The (redirect) URL hash would look
 something like `https://site.tld/post-with-comments/#comment-
 1234_abcd1234` where `abcd1234` would be the WP hash allowing the user to
 see their unapproved comment. Then we can use
 `window.history.replaceState()` to remove the `_abcd1234` part.

 As far as I see this should work, the browser will scroll to the location
 of the comment, if that script runs in the head. Will test a bit more.

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


More information about the wp-trac mailing list