diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php index ca42e76..c007a5c 100644 --- a/core/lib/Drupal/Core/Entity/EntityViewBuilder.php +++ b/core/lib/Drupal/Core/Entity/EntityViewBuilder.php @@ -18,7 +18,6 @@ use Drupal\Core\TypedData\TranslatableInterface; use Drupal\Core\Render\Element; use Drupal\entity\Entity\EntityViewDisplay; -use Drupal\Core\Render\Element; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -373,7 +372,6 @@ public function preprocess(array &$variables) { $variables['view_mode'] = $variables['elements']['#view_mode']; $entity = $variables['elements']['#' . $this->entityTypeId]; $variables[$this->entityTypeId] = $entity; - $variables['url'] = $entity->url(); // Helpful $content variable for templates. $variables += array('content' => array()); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index ffd00ef..8674c5e 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -305,6 +305,7 @@ function template_preprocess_taxonomy_term(&$variables) { /** @var \Drupal\taxonomy\TermInterface $term */ $term = $variables['taxonomy_term']; + $variables['url'] = $term->url(); // We use name here because that is what appears in the UI. $variables['name'] = $variables['elements']['name']; unset($variables['elements']['name']);