Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292476

Comments fragment identifier has disappeared

$
0
0

Problem/Motivation

On node teasers, the Comment module adds a few links :

  1. "X comments" which leads to /node/NID#comments but the anchor does not exist in the page ;
  2. "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

  1. Install Drupal standard
  2. Create an article with a huge body
  3. Add a comment to this article
  4. 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

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Create a patchInstructionsDone
Update the issue summaryInstructionsDone
Add automated testsInstructionsDone
Update the patch to incorporate feedback from reviews (include an interdiff)InstructionsSee #16
Manually test the patch NoviceInstructions
Add steps to reproduce the issueNoviceInstructionsDone
Embed before and after screenshots in the issue summary NoviceInstructionsDone
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standardsInstructions

User interface changes

None.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 292476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>