diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index bac4428..f21d00f 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -258,7 +258,7 @@ function shortcut_renderable_links($shortcut_set = NULL) { $shortcut = \Drupal::entityManager()->getTranslationFromContext($shortcut); $links[] = array( 'title' => $shortcut->label(), - 'url' => Url::fromRoute($shortcut->route_name->value, $shortcut->route_parameters->value), + 'url' => Url::fromRoute($shortcut->getRouteName(), $shortcut->getRouteParams()), ); $cache_tags = Cache::mergeTags($cache_tags, $shortcut->getCacheTag()); } diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index 75d5b22..97f536d 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -108,7 +108,10 @@ public function setRouteName($route_name) { * {@inheritdoc} */ public function getRouteParams() { - return $this->get('route_parameters')->first()->getValue(); + $value = $this->get('route_parameters')->first()->getValue(); + // @todo Investigate why there is a stray 'value' key. + unset($value['value']); + return $value; } /**