Problem/Motivation
When indexing and displaying comments on a node the search result and index will include admin text like "Log in" or "Delete".

Steps to reproduce
Install Standard
Create an Article
Add several comments
Search for a keyword that appears in the article
Proposed resolution
Do not render operations in CommentHooks::nodeUpdateIndex().
Remaining tasks
- Patch
- Review
- Commit
User interface changes
None
API changes
None
Data model changes
None, although it could be argued that we should cause a re-index of all node's. However I think we should just let that occur naturally.
Issue fork drupal-2544516
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
alexpottComment #2
larowlanI think that there might already be an issue for this, will go digging
Comment #3
wuinfo - bill wu commentedThanks, @larowlan,
Similar issue here: Comment module renders "reply" and other links in search index/results
Comment #4
subhojit777Comment #5
wuinfo - bill wu commentedHere is the patch for it. I added new comment displays which was suggested here: Comment module renders "reply" and other links in search index/results
Comment #6
wuinfo - bill wu commentedFixed the exception in previous patch.
Comment #7
wuinfo - bill wu commentedHere is the test patch.
Comment #8
wuinfo - bill wu commentedComment #9
wuinfo - bill wu commentedComment #12
wuinfo - bill wu commentedPatch together with the test and fix.
Comment #13
wuinfo - bill wu commentedComment #17
merilainen commentedI applied the patch, re-indexed content, ran cron and cleared caches. There is still extra text visible for both anonymous and admin users, see the attached file. Admins see "Delete Edit Reply" text and anonymous users see "Login or register to post".
Edit: This works if I disable and enable the comment module, or import the new configuration with config_devel. But this should happen automatically so that sites which have comment module enabled will get the new configuration into active storage. Maybe in an update hook?
Comment #20
avpadernoComment #31
acbramley commentedLooks like this is still reproducible on HEAD, only for administrators though.
Comment #32
avpaderno