The links to comments in the Issue status update emails work until the issue gets long and wraps to a second page. At this point the link in the email will send you to the top of the first page (0), when it should send you to the second page where the comment is.

Here is a link I received recently in my inbox that did not work:
https://www.drupal.org/node/1356276#comment-12160982

That link fails because the page is not included in the url. Adding the ?page=1 to the link turns it into a functioning link as it takes us to the second page where the comment is.

https://www.drupal.org/project/drupal/issues/1356276?page=1#comment-12160982

Comments

frederickjh created an issue. See original summary.

avpaderno’s picture

Project: Drupal.org site moderators » Drupal.org customizations
Version: » 7.x-3.x-dev
Component: Other » Code

I am not sure this is the default behavior on Drupal, and in this case it should be reported as bug for the Drupal version used on Drupal.org, or there is a custom module causing this.

Let's start with the last option. (I apologize if I am moving the issue to the wrong queue.)

drumm’s picture

Project: Drupal.org customizations » Project issue tracking
Version: 7.x-3.x-dev » 7.x-2.x-dev
Component: Code » Issues

Looks like this is a bug in the project_issue_email_get_comment_header() function.

dhanya_girish’s picture

Attaching the patch for appending the page number to the issue comment link.

dhanya_girish’s picture

Appends page number to issue status update email links to comments.

drumm’s picture

Status: Active » Fixed

When reviewing this, I remembered that Drupal.org sites with project module use https://www.drupal.org/project/comment_fragment, and I’d recommend that for any other D7 site. And that module will take care of any comment links that use the entity_uri() API.

Committed & deployed that solution.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.