Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: https://api.drupal.org/api/drupal/core%21modules%21node%21node.api.php/f...
The href and query array keys no longer do anything.
See https://api.drupal.org/api/drupal/core!modules!comment!comment.api.php/f... for a correct example.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2806827-7.patch | 749 bytes | shashikant_chauhan |
#3 | 2806827-3.patch | 1.96 KB | shashikant_chauhan |
Comments
Comment #2
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedComment #3
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedAdding patch.
Comment #4
joachim CreditAttribution: joachim as a volunteer 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 CreditAttribution: shashikant_chauhan as a volunteer and at Iksula 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 CreditAttribution: joachim as a volunteer 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 CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedUpdated the patch.
Comment #8
joachim CreditAttribution: joachim as a volunteer 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.