From a84b70afef312b56dff5b650a8cbdba5afe60a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B4me=20Bakker?= Date: Wed, 15 Jan 2025 15:06:50 +0100 Subject: [PATCH] fix(breadcrumb): improved detection for link to self breadcrumb --- engine/lib/breadcrumbs.php | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/lib/breadcrumbs.php b/engine/lib/breadcrumbs.php index 80ac2ff2453..88097e3a77e 100644 --- a/engine/lib/breadcrumbs.php +++ b/engine/lib/breadcrumbs.php @@ -35,6 +35,7 @@ function elgg_push_entity_breadcrumbs(\ElggEntity $entity): void { elgg_push_collection_breadcrumbs($entity->type, $entity->subtype, $entity->getContainerEntity()); $link_self = elgg_get_current_route_name() !== "view:{$entity->type}:{$entity->subtype}"; + $link_self = $link_self && !elgg_http_url_is_identical(elgg_get_current_url(), $entity->getURL()); if ($link_self) { elgg_register_menu_item('breadcrumbs', [ 'name' => 'entity',