What are the steps required to reproduce the bug?

  1. Click the "Add new comment" link on a node's link area.
  2. It will take you to http://example.com/comment/reply/*#comment-form (where * is the nid, of course). Go to the top of the page.
  3. Look at the page title. Here you will see the string "Reply to comment"

What behavior were you expecting?

I was expecting to see the page title depicting that I am replying to a node (eg. "Reply to article", "Reply to !nodetype" or "Reply to !title")

What happened instead?

Instead I saw the text "Reply to comment" as the page title which is not what I'm doing. I was replying to a node.

Personal theories and recommendations

Normally, users do not see this text string because we are directed to the #comment-form right away. In times that we want to read again the node we are replying, then we scroll to the top of the page to see the node's preview. That's when it becomes weird and confusing to see that I am replying to a comment. This also shows on the browser's page title.

I am assuming that this text string is also used if a user is replying to a comment. Probably we can have something like "Reply to !title" instead so we can use the same string as the page title in both scenarios.

Comments

johnnoc’s picture

Changing the text from "Reply to comment" to a more general text like "Post new comment" would be okay as well, IMO

Equ’s picture

Any progress?

entr3p’s picture

+1 This something very strange and should be fixed immediately. You could also just make the text "Reply to" as the title of the node appears right under it.

yrre7’s picture

The page title is changed to "Reply to Comment". This is bad..
Shouldn't this be a bug?

Anonymous’s picture

Status: Active » Needs work

#1

+1

That would be a quick one size fits all solution. Would require for translations to be updated as well.

An alternative way to go could also be:

Pseudocode:


// If first comment 'Post new comment' 

   $items['comment/reply/%node'] = array(
    'title' => 'Post new comment',
    'page callback' => 'node_reply',
    'page arguments' => array(2),
    'access callback' => 'node_access',
    'access arguments' => array('view', 2),
    'type' => MENU_CALLBACK,
    'file' => 'comment.pages.inc',
  );

// If path has comments then print 'Reply to comment'

$items['comment/reply/%node#comment-' . $num_comment] = array(  
    'title' => 'Reply to comment',
    'page callback' => 'comment_reply',
    'page arguments' => array(2),
    'access callback' => 'node_access',
    'access arguments' => array('view', 2),
    'type' => MENU_CALLBACK,
    'file' => 'comment.pages.inc',
  );

In comment.module in modules comment folder.

Which from a usability point might be considered better.

shendric’s picture

Version: 6.3 » 6.19

Has there been any forward movement on this? I'd really like to know how to change this without changing the core modules.

jgraham’s picture

Issue tags: +the founder of <a href=

This could also be addressed via hook_menu_alter() to override the existing title keeping all of the other attributes the same.

http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...

Littlebob’s picture

Anyone know how to fix this?

jdvc’s picture

Well you could just get ride of the page title. It doesn't really seem necessary when the user gets directed to the comment for with the anchor tag. Make a module called 'custom' and

/**
 * Implementation of hook_menu_alter for comment reply page title().
 */
function custom_menu_alter(&$items) {
  $items['comment/reply/%node']['title'] = FALSE;  
}

Or you could probably do something more in depth like adding a conditional or something, but I don't even think that the title is necessary.

Anonymous’s picture

Status: Needs work » Postponed (maintainer needs more info)

In Drupal 7 this seems to have been changed to 'Add New Comment'.

Is this still an issue for Drupal 6?

Status: Postponed (maintainer needs more info) » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.