Skip to content

Commit ea97d9a

Browse files
committed
Assemble URLs for all cultures, not just the default.
1 parent 14b645d commit ea97d9a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/Umbraco.Core/Routing/NewDefaultUrlProvider.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private string GetLegacyRouteFormatById(Guid key, string? culture)
226226
{
227227
if (string.IsNullOrWhiteSpace(route) || route.Equals("#"))
228228
{
229-
if (_logger.IsEnabled(Microsoft.Extensions.Logging.LogLevel.Debug))
229+
if (_logger.IsEnabled(LogLevel.Debug))
230230
{
231231
_logger.LogDebug(
232232
"Couldn't find any page with nodeId={NodeId}. This is most likely caused by the page not being published.",
@@ -248,15 +248,8 @@ private string GetLegacyRouteFormatById(Guid key, string? culture)
248248
current,
249249
culture);
250250

251-
var defaultCulture = _localizationService.GetDefaultLanguageIsoCode();
252-
if (domainUri is not null || string.IsNullOrEmpty(culture) ||
253-
culture.Equals(defaultCulture, StringComparison.InvariantCultureIgnoreCase))
254-
{
255-
var url = AssembleUrl(domainUri, path, current, mode).ToString();
256-
return UrlInfo.Url(url, culture);
257-
}
258-
259-
return null;
251+
var url = AssembleUrl(domainUri, path, current, mode).ToString();
252+
return UrlInfo.Url(url, culture);
260253
}
261254

262255
#endregion

0 commit comments

Comments
 (0)