From d10487d5b8f54ce86fa8d8f36649febd338dbae8 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 31 Aug 2019 12:51:10 +0200 Subject: [PATCH] Preserve the custom URL for i18n CMS landing pages Dropping the customUrl for them will cause all variants of the page to use the same exact URL. It is already possible to manually define a localized page as an empty url, removing the need for an implicit removal. --- .../lib/system/cache/builder/RoutingCacheBuilder.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php b/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php index cae8506b3a..50453f7fc5 100644 --- a/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php +++ b/wcfsetup/install/files/lib/system/cache/builder/RoutingCacheBuilder.class.php @@ -191,7 +191,7 @@ class RoutingCacheBuilder extends AbstractCacheBuilder { $cmsIdentifier = '__WCF_CMS__' . $row['pageID'] . '-' . ($row['languageID'] ?: 0); // Discard the custom url if this CMS page is the landing page of its associated app. - if (!empty($landingPages[$abbreviations[$packageID]]) && $landingPages[$abbreviations[$packageID]][0] === '__WCF_CMS__' . $row['pageID']) { + if (!empty($landingPages[$abbreviations[$packageID]]) && $landingPages[$abbreviations[$packageID]][0] === '__WCF_CMS__' . $row['pageID'] && !$row['languageID']) { $customUrl = ''; } $data['reverse'][$abbreviations[$packageID]][$cmsIdentifier] = $customUrl; -- 2.20.1