Problem/Motivation
On node teasers, the Comment module adds a few links :
- "X comments" which leads to
/node/NID#comments
but the anchor does not exist in the page ; - "New" (if there are new comments the user didn't read) which leads to
/node/NID#new
that only works if you only have one comment field => See #2969255: Comments + History "new" link only works with one comment field
Steps to reproduce #1
- Install Drupal standard
- Create an article with a huge body
- Add a comment to this article
- Go to the front page and click on the "1 comment" link of your article
Expected: you are redirected to the node page and the browser shows the comment
Current: you are redirected to the node page but the browser show the top of the page
Proposed resolution
Add the field name to the anchor so it becomes "comments--[field-name]".
Add the "comments--[field-name]" id on the comments wrapper.
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions | Done | |
Update the issue summary | Instructions | Done | |
Add automated tests | Instructions | Done | |
Update the patch to incorporate feedback from reviews (include an interdiff) | Instructions | See #16 | |
Manually test the patch | Novice | Instructions | |
Add steps to reproduce the issue | Novice | Instructions | Done |
Embed before and after screenshots in the issue summary | Novice | Instructions | Done |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Instructions |
User interface changes
None.
API changes
None.
Data model changes
None.