WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 16 months ago

#38009 new defect (bug)

#reply-title.comment-reply-title not updating when replying to an individual

Reported by: iguel Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Comments Keywords:
Focuses: Cc:
PR Number:

Description

From what I can tell, in the $defaults array 'title_reply_to' on Line 2227 of wp-includes/comment-template.php is supposed to be called when I click "Reply" to another commenter, but it is not doing so in every theme I have tried, however, it does work in the customizer view. Here's a screenshot of what I found.

Attachments (1)

comment-bug.png (216.1 KB) - added by iguel 3 years ago.

Download all attachments as: .zip

Change History (4)

@iguel
3 years ago

#1 @stopdesign
17 months ago

Adding to this to confirm that I also see this behavior of title_reply_to not changing the title. I have never seen the title change to 'Leave a Reply to %s' as documented when replying to another comment. Even though the form moves and the 'cancel reply' link is made visible -- signs that comment-reply.js seems to have been properly enqueued. This is true not only on my own custom theme that I’m working on now, but on every WordPress site I have found so far, including @matt's own site:

https://ma.tt/2018/05/wordpress-at-15/#comments

and others with the exact same reproducible bug:

https://www.positivityblog.com/22-inspirational-quotes-on-fear/#comments

https://rafaelnadalfans.com/2018/05/31/rafael-nadal-pays-tribute-to-zinedine-zidane/#comments

http://hurrahforgin.com/2017/12/14/adulthood-sucks/#comments

Observed on WordPress v 4.9.6

#2 @obenland
16 months ago

  • Version 4.6.1 deleted

Hi @iguel, welcome to WordPress Trac!

What it comes down to here is context. The comment-reply script moves the comment form right underneath the comment you want to reply to. With that context, I assume, comment-reply was not built to update the respond title.

If that script is not present however (or in case of the Customizer the reply link is followed), the form remains at the bottom of the page, and to create context the respond title gets amended with the original commenter's name.

#3 @stopdesign
16 months ago

Hi @obenland - Thanks for the reply.

I understand the context and how the comment form moves or not in case the script doesn't exist. What I am pointing out (and I think, @iguel too) is that according to the codex for 'comment_form()' the title_reply_to arg exists for the purpose of contextually changing the title to Leave a Reply to %s.

Even if title_reply_to is currently ignored when the script is present, we’re pointing out that title_reply_to should be respected in addition to moving the form, especially when the arg is explicitly included in comment_form() args. If the title is important enough to modify when the form can’t move because of a missing script, it's important enough to modify when the form moves too. The context of where the form appears can still be complemented by a title that responds to the shifted context.

The additional context a modified title helps provide is useful to the user whether the comment form moves or not. It looks broken to me that the title does not update when the context of the reply and form switches, when I know an arg exists for declaring a modified title for replying to another comment.

Thanks for considering.

Note: See TracTickets for help on using tickets.