diff --git a/core/modules/system/system.module b/core/modules/system/system.module old mode 100644 new mode 100755 index a1a6b71..7ad70b9 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -661,7 +661,8 @@ function system_page_attachments(array &$page) { // @see \Drupal\Core\Utility\LinkGenerator::generate() // @see template_preprocess_links() // @see \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter - if (\Drupal::currentUser()->isAuthenticated()) { + $route_name = \Drupal::request()->attributes->get('_route'); + if (\Drupal::currentUser()->isAuthenticated() || 'system.404' === $route_name) { $page['#attached']['library'][] = 'core/drupal.active-link'; } }