fix #3229 - changing page path in Edot Page when invoked from Control Panel results in 404 when redirecting
This commit is contained in:
parent
4a20be8b34
commit
037f1ec887
|
@ -280,16 +280,10 @@ namespace Oqtane.Controllers
|
|||
if (currentPage.Path != page.Path)
|
||||
{
|
||||
var urlMapping = _urlMappings.GetUrlMapping(page.SiteId, currentPage.Path);
|
||||
if (urlMapping == null)
|
||||
if (urlMapping != null)
|
||||
{
|
||||
urlMapping = new UrlMapping();
|
||||
urlMapping.SiteId = page.SiteId;
|
||||
urlMapping.Url = currentPage.Path;
|
||||
urlMapping.MappedUrl = page.Path;
|
||||
urlMapping.Requests = 0;
|
||||
urlMapping.CreatedOn = System.DateTime.UtcNow;
|
||||
urlMapping.RequestedOn = System.DateTime.UtcNow;
|
||||
_urlMappings.AddUrlMapping(urlMapping);
|
||||
_urlMappings.UpdateUrlMapping(urlMapping);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user