mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixed an issue when changing the homepage.
This fixes an issue where the previous published homepage would not have its regenerated alias stored.
This commit is contained in:
@@ -66,6 +66,10 @@ namespace Orchard.Autoroute.Handlers {
|
||||
if (current != null) {
|
||||
current.CustomPattern = String.Empty; // force the regeneration
|
||||
current.DisplayAlias = _autorouteService.Value.GenerateAlias(current);
|
||||
|
||||
// we changed the alias of the previous homepage, so publish this change if the content item was published.
|
||||
if(current.IsPublished())
|
||||
_orchardServices.ContentManager.Publish(current.ContentItem);
|
||||
}
|
||||
_autorouteService.Value.PublishAlias(current);
|
||||
}
|
||||
|
Reference in New Issue
Block a user