diff --git a/src/Orchard.Web/Modules/Orchard.Pages/Services/SlugConstraint.cs b/src/Orchard.Web/Modules/Orchard.Pages/Services/SlugConstraint.cs index 48c45fc7f..183a5bac4 100644 --- a/src/Orchard.Web/Modules/Orchard.Pages/Services/SlugConstraint.cs +++ b/src/Orchard.Web/Modules/Orchard.Pages/Services/SlugConstraint.cs @@ -42,6 +42,9 @@ namespace Orchard.Pages.Services { public string LookupPublishedSlug(string slug) { lock (_syncLock) { + if (slug == null) + return ""; + string actual; if (_currentlyPublishedSlugs.TryGetValue(slug, out actual)) return actual; diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs index 346a57c1d..8dd2b4e57 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Controllers/SetupController.cs @@ -1,5 +1,6 @@ using System; using System.Web.Mvc; +using Orchard.Comments.Models; using Orchard.ContentManagement; using Orchard.Core.Common.Models; using Orchard.Core.Settings.Models; @@ -29,15 +30,15 @@ namespace Orchard.Setup.Controllers { private Localizer T { get; set; } - public ActionResult Index() { - return View(new SetupViewModel { AdminUsername = "admin" }); + public ActionResult Index(SetupViewModel model) { + return View(model ?? new SetupViewModel { AdminUsername = "admin" }); } - [HttpPost] - public ActionResult Index(SetupViewModel model) { + [HttpPost, ActionName("Index")] + public ActionResult IndexPOST(SetupViewModel model) { try { if (!ModelState.IsValid) { - return View(model); + return Index(model); } // initialize the database: @@ -67,8 +68,9 @@ namespace Orchard.Setup.Controllers { // create home page as a CMS page var page = contentManager.Create("page"); page.As().Text = "Welcome to Orchard"; - page.As().Slug = "home"; + page.As().Slug = ""; page.As().Title = model.SiteName; + page.As().CommentsShown = false; contentManager.Publish(page); var authenticationService = finiteEnvironment.Resolve(); @@ -78,11 +80,11 @@ namespace Orchard.Setup.Controllers { _notifier.Information(T("Setup succeeded")); // redirect to the welcome page. - return Redirect("~/home"); + return Redirect("~/"); } catch (Exception exception) { _notifier.Error(T("Setup failed: " + exception.Message)); - return RedirectToAction("Index"); + return Index(model); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj index 37da7d6a2..f89cc3761 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj +++ b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj @@ -83,6 +83,10 @@ {9916839C-39FC-4CEB-A5AF-89CA7E87119F} Orchard.Core + + {14C049FD-B35B-415A-A824-87F26B26E7FD} + Orchard.Comments + diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 025df4ecb..53968a055 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -92,8 +92,6 @@ - - diff --git a/src/Orchard.Web/Views/Home/Index.ascx b/src/Orchard.Web/Views/Home/Index.ascx deleted file mode 100644 index 3638ac5d6..000000000 --- a/src/Orchard.Web/Views/Home/Index.ascx +++ /dev/null @@ -1,4 +0,0 @@ -<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> -<% Html.AddPageClassNames("home"); %> -

Welcome to Orchard

-

To learn more about Orchard visit http://orchardproject.net.

\ No newline at end of file diff --git a/src/Orchard.Web/Views/Web.config b/src/Orchard.Web/Views/Web.config deleted file mode 100644 index e065d8735..000000000 --- a/src/Orchard.Web/Views/Web.config +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -