Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
26 Sep 2016 at 20:03 UTC
Updated:
13 Oct 2016 at 12:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
shashikant_chauhan commentedComment #3
shashikant_chauhan commentedAdding patch.
Comment #4
joachim commentedThe changes to the docs file look good, but your patch has additional stuff in it.
(I would recommend the use of a git branch for each issue, to avoid this sort of problem, BTW.)
Comment #5
shashikant_chauhan commented@jaochim, In sample code of hook_comment_links_alter
code:
Url::fromRoute('comment_test.report', ['comment' => $entity->id()], ['query' => ['token' => \Drupal::getContainer()->get('csrf_token')->get("comment/{$entity->id()}/report")]])The Url::fromRoute takes $route_name as a first parameter and in comment_test module comment_test.report route is defined, but in case of node_test module there was no such route defined. So I have created new route called "node_test.report" in node_test.routing.yml.
Should I remove the route "node_test.report" and its related code?
Comment #6
joachim commentedThe route doesn't need to be a real route; this is just sample code. Or it could be a different route from node module, or from a test module.
Comment #7
shashikant_chauhan commentedUpdated the patch.
Comment #8
joachim commentedLooks good. Thanks for the patch!
Comment #9
alexpottCommitted and pushed 4a53d2f to 8.3.x and dfef782 to 8.2.x. Thanks!
This is rc eligible as documentation.