Enable comment_fragment 7.x-1.x-dev to improve issue comment permalinks
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #2125397. --> Reported by: [dww](https://www.drupal.org/user/46549) >>> <p>This is default behavior in D7 after <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/26966" title="Status: Closed (fixed)">#26966: Fix comment links when paging is used.</a></span>. </p> <p> In D6, the <a href="https://www.drupal.org#">#4</a> links next to each issue comment included the URL like node/X#comment-Y. Now, they just look something like this:</p> <p><a href="https://drupal.org/comment/8133955#comment-8133955">https://drupal.org/comment/8133955#comment-8133955</a></p> <p>That causes some problems:</p> <ul> <li>The Druplicon bot code doesn't currently handle this form of lines</li> <li>it makes it harder for people to know what you're talking about. (why?)</li> <li>For people who need the node id (e.g. committing a patch, linking to it with [#ddd] style it is now harder to find the node id.</li> </ul> <p>Workarounds</p> <ul> <li>hover on the node's edit tab and look at the url</li> <li>if the comment has an attachment, use the link from the attachment below the issue summary</li> </ul> <p>Potential solutions:</p> <ol> <li>Revert (in the theme?) to using node/nid#comment-cid style links on the comment id and just live with the fact that discussions that span a page will not have links that work properly</li> <li>Fix <a href="https://drupal.org/project/bot">druplicon</a></li> <li>Put the nid somewhere else on the page to make it easier to find and copy/paste</li> <li>Revert to using node/nid#comment-cid style links, but include a page parameter and live with the fact that very occasionally comments will move page</li> </ol> <p>I put what seems to be the most popular solution at #1. Solutions #2 and and #3 would need to be done if #1 isn't.</p> <p>Advantages of node/123#comment-456 format:</p> <ul> <li>Issue ID easy to retrieve</li> <li>Tools expect them (dreditor, druplicon)</li> <li>People expect them</li> <li>Consistency between node and comment URIs</li> </ul> <p>Disadvantages of node/123#comment-456 format:</p> <ul> <li>Occasionally links to the wrong page (can mostly be fixed by adding a page parameter).</li> </ul> <h3>Deployment</h3> <ul> <li>Apply patch <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/1200478" title="Status: Closed (fixed)">#1200478: Changing the comment path to the node path triggers a PHP fatal error in l() due to wrongly structured options</a></span> (passes tests, straightforward, okay to hack core for Drupal.org)</li> <li>Resolve <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/comment_fragment/issues/2227073" title="Status: Closed (fixed)">#2227073: Remove calls to drupal_get_path_alias()</a></span> &amp; <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/comment_fragment/issues/2239337" title="Status: Closed (fixed)">#2239337: Add 7.x-1.x-dev release</a></span></li> <li>Enable comment_fragment 7.x-1.x-dev</li> </ul> > Related issue: [Issue #26966](https://www.drupal.org/node/26966) > Related issue: [Issue #2010202](https://www.drupal.org/node/2010202) > Related issue: [Issue #2113323](https://www.drupal.org/node/2113323) > Related issue: [Issue #1200478](https://www.drupal.org/node/1200478)
issue