From fff53a694d569bd44dc0fe01f780b06c3cb68fce Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 7 Jan 2022 09:49:58 -0500 Subject: [PATCH] Fix issue processwire/processwire-issues#1479 --- wire/core/PagesPathFinder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wire/core/PagesPathFinder.php b/wire/core/PagesPathFinder.php index a5e81c93..a3ea6cfa 100644 --- a/wire/core/PagesPathFinder.php +++ b/wire/core/PagesPathFinder.php @@ -1907,7 +1907,8 @@ class PagesPathFinder extends Wire { if(strpos($path, '/') !== 0) $path = "/$path"; $segment = $this->languageSegment($language); if(!strlen($segment)) return $path; - if($path === "/$segment" || strpos($path, "/$segment/") === 0) return $path; + if($path === "/$segment" && $this->result['page']['id'] < 2) return $path; + if(strpos($path, "/$segment/") === 0) return $path; return "/$segment$path"; }