diff -u b/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module --- b/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -46,7 +46,7 @@ 'id' => $node->id(), 'type' => 'node', ], - 'url' => Url::fromUri('base:' . drupal_get_path('module', 'statistics') . '/statistics.php')->toString(), + 'url' => Url::fromUri('base:' . \Drupal::service('extension.path.resolver')->getPath('module', 'statistics') . '/statistics.php')->toString(), ]; $build['#attached']['drupalSettings']['statistics'] = $settings; } @@ -75,7 +75,7 @@ 'id' => $entity->id(), 'type' => $entity_type_id, ], - 'url' => Url::fromUri('base:' . drupal_get_path('module', 'statistics') . '/statistics.php')->toString(), + 'url' => Url::fromUri('base:' . \Drupal::service('extension.path.resolver')->getPath('module', 'statistics') . '/statistics.php')->toString(), ]; $build['#attached']['drupalSettings']['statistics'] = $settings; }