fix logic issue in url mapping, improve 404 handling, add property change component notifications
This commit is contained in:
@ -153,7 +153,7 @@ namespace Oqtane.Pages
|
||||
}
|
||||
|
||||
var page = _pages.GetPage(route.PagePath, site.SiteId);
|
||||
if (page != null & !page.IsDeleted)
|
||||
if (page != null && !page.IsDeleted)
|
||||
{
|
||||
// set page title
|
||||
if (!string.IsNullOrEmpty(page.Title))
|
||||
@ -182,6 +182,14 @@ namespace Oqtane.Pages
|
||||
url = (urlMapping.MappedUrl.StartsWith("http")) ? urlMapping.MappedUrl : route.SiteUrl + "/" + urlMapping.MappedUrl;
|
||||
return RedirectPermanent(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (route.PagePath != "404")
|
||||
{
|
||||
_logger.Log(LogLevel.Information, "Host", LogFunction.Other, "Page Path /{Path} Does Not Exist", route.PagePath);
|
||||
return RedirectPermanent(route.SiteUrl + "/404");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// include global resources
|
||||
|
Reference in New Issue
Block a user