diff --git a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php index b3a9219..6de2021 100644 --- a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php +++ b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php @@ -11,7 +11,6 @@ use Drupal\Core\Block\BlockBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Session\AccountInterface; -use Drupal\Core\Url; use Drupal\Core\Cache\Cache; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; @@ -199,14 +198,14 @@ protected function nodeTitleList($counts, $title){ $items = array(); foreach ($counts as $count) { - $items [] = \Drupal::l($nodes[$count]->getTitle(), new Url('entity.node.canonical', ['node' => $count], array())); + $items [] = \Drupal::l($nodes[$count]->getTitle(), $nodes[$count]->urlInfo()); } return array( '#theme' => 'item_list__node', '#items' => $items, '#title' => $title, - '#cache' => ['tags' => Cache::mergeTags(['node_list'],Cache::buildTags('node', $counts))] + '#cache' => ['tags' => Cache::mergeTags(['node_list'], Cache::buildTags('node', $counts))] ); } diff --git a/core/modules/statistics/src/StatisticsDatabaseStorage.php b/core/modules/statistics/src/StatisticsDatabaseStorage.php index 93a29cf..0132e2a 100644 --- a/core/modules/statistics/src/StatisticsDatabaseStorage.php +++ b/core/modules/statistics/src/StatisticsDatabaseStorage.php @@ -1,10 +1,17 @@