diff --git a/core/lib/Drupal/Core/Cache/Context/PathParentCacheContext.php b/core/lib/Drupal/Core/Cache/Context/PathParentCacheContext.php index 60481f9..c815077 100644 --- a/core/lib/Drupal/Core/Cache/Context/PathParentCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/PathParentCacheContext.php @@ -1,6 +1,6 @@ requestStack->getCurrentRequest(); $path_elements = explode('/', trim($request->getPathInfo(), '/')); array_pop($path_elements); @@ -57,7 +54,7 @@ public function getContext() { * {@inheritdoc} */ public function getCacheableMetadata() { - return new CacheableMetadata(); + return new CacheableMetadata(); } } diff --git a/core/modules/system/src/PathBasedBreadcrumbBuilder.php b/core/modules/system/src/PathBasedBreadcrumbBuilder.php index f148b45..704528d 100644 --- a/core/modules/system/src/PathBasedBreadcrumbBuilder.php +++ b/core/modules/system/src/PathBasedBreadcrumbBuilder.php @@ -137,7 +137,7 @@ public function build(RouteMatchInterface $route_match) { // @todo Find a better way to deal with /user. $exclude['/user'] = TRUE; // Add the url.breadcrumb cache context. - $breadcrumb->addCacheContexts(['url.breadcrumb']); + $breadcrumb->addCacheContexts(['url.path.parent']); while (count($path_elements) > 1) { array_pop($path_elements); // Copy the path elements for up-casting.