diff -u b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php --- b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php +++ b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php @@ -7,7 +7,6 @@ namespace Drupal\Core\Render\Element; -use Drupal\Core\Url; use Drupal\Component\Utility\NestedArray; /** @@ -60,7 +59,7 @@ if (system_admin_compact_mode()) { $element['#title'] = \Drupal::translation()->translate('Show descriptions'); - $element['#url'] = Url::fromRoute('system.admin_compact_page', array('mode' => 'off')); + $element['#url'] = \Drupal::url('system.admin_compact_page', array('mode' => 'off')); $element['#options'] = array( 'attributes' => array('title' => \Drupal::translation()->translate('Expand layout to include descriptions.')), 'query' => drupal_get_destination(), @@ -68,7 +67,7 @@ } else { $element['#title'] = \Drupal::translation()->translate('Hide descriptions'); - $element['#url'] = Url::fromRoute('system.admin_compact_page', array('mode' => 'on')); + $element['#url'] = \Drupal::url('system.admin_compact_page', array('mode' => 'on')); $element['#options'] = array( 'attributes' => array('title' => \Drupal::translation()->translate('Compress layout by hiding descriptions.')), 'query' => drupal_get_destination(),