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.
With code like $node = \Drupal::routeMatch()->getParameter('node')
, getParameter() returns a string (the nid) on a revisions page but a full node object on a normal node page. Speaking with some folks in IRC, I was asked to report this as broken as getParameter should return the node object in both cases.
Comments
Comment #2
jasonawantClosing as duplicate of https://www.drupal.org/node/2730631
Comment #3
mpp CreditAttribution: mpp as a volunteer and at AmeXio for District09 commented