change order of operations when saving in edit page
This commit is contained in:
@@ -576,6 +576,7 @@
|
|||||||
await ScrollToPageTop();
|
await ScrollToPageTop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(_themetype) && _containertype != "-")
|
if (!string.IsNullOrEmpty(_themetype) && _containertype != "-")
|
||||||
{
|
{
|
||||||
string currentPath = _page.Path;
|
string currentPath = _page.Path;
|
||||||
@@ -635,6 +636,13 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update theme settings
|
||||||
|
if (_themeSettingsType != null && _themeSettings is ISettingsControl themeSettingsControl)
|
||||||
|
{
|
||||||
|
await themeSettingsControl.UpdateSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
// default page properties
|
||||||
if (_insert != "=")
|
if (_insert != "=")
|
||||||
{
|
{
|
||||||
Page child;
|
Page child;
|
||||||
@@ -688,7 +696,10 @@
|
|||||||
_page.UpdateModulePermissions = bool.Parse(_updatemodulepermissions);
|
_page.UpdateModulePermissions = bool.Parse(_updatemodulepermissions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update page
|
||||||
_page = await PageService.UpdatePageAsync(_page);
|
_page = await PageService.UpdatePageAsync(_page);
|
||||||
|
|
||||||
|
// update page order
|
||||||
await PageService.UpdatePageOrderAsync(_page.SiteId, _page.PageId, _page.ParentId);
|
await PageService.UpdatePageOrderAsync(_page.SiteId, _page.PageId, _page.ParentId);
|
||||||
if (_currentparentid == string.Empty)
|
if (_currentparentid == string.Empty)
|
||||||
{
|
{
|
||||||
@@ -699,11 +710,6 @@
|
|||||||
await PageService.UpdatePageOrderAsync(_page.SiteId, _page.PageId, int.Parse(_currentparentid));
|
await PageService.UpdatePageOrderAsync(_page.SiteId, _page.PageId, int.Parse(_currentparentid));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_themeSettingsType != null && _themeSettings is ISettingsControl themeSettingsControl)
|
|
||||||
{
|
|
||||||
await themeSettingsControl.UpdateSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
await logger.LogInformation("Page Saved {Page}", _page);
|
await logger.LogInformation("Page Saved {Page}", _page);
|
||||||
if (!string.IsNullOrEmpty(PageState.ReturnUrl))
|
if (!string.IsNullOrEmpty(PageState.ReturnUrl))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user