From aa3b8fb808b91e4bf3bd5ec0fcb0dc7e2de4a79d Mon Sep 17 00:00:00 2001 From: starfighter83 Date: Fri, 7 Jan 2011 09:20:32 -0100 Subject: [PATCH] Fixed: Juno, installing starter kit from developer section works but ends in YSOD Fixed: Juno, installing skin from developer section works but ends in YSOD Work Items: 29821, 29820 --- .../Skinning/loadStarterKitDesigns.ascx.cs | 21 +++++++++++-- .../steps/Skinning/loadStarterKits.ascx.cs | 20 ++++++++++++- .../developer/Packages/StarterKits.aspx | 4 ++- .../developer/Packages/StarterKits.aspx.cs | 30 +++++++++++++++++-- .../Packages/StarterKits.aspx.designer.cs | 9 ++++++ 5 files changed, 78 insertions(+), 6 deletions(-) diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs index 16aee49e81..acc737d0c2 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs @@ -8,8 +8,18 @@ using umbraco.BusinessLogic; namespace umbraco.presentation.install.steps.Skinning { + public delegate void StarterKitDesignInstalledEventHandler(); + public partial class loadStarterKitDesigns : System.Web.UI.UserControl { + + public event StarterKitDesignInstalledEventHandler StarterKitDesignInstalled; + + protected virtual void OnStarterKitDesignInstalled() + { + StarterKitDesignInstalled(); + } + public Guid StarterKitGuid { get; set; } private cms.businesslogic.packager.repositories.Repository repo; @@ -121,10 +131,17 @@ namespace umbraco.presentation.install.steps.Skinning } catch { - Helper.RedirectToNextStep(Page); + } - Helper.RedirectToNextStep(Page); + try + { + Helper.RedirectToNextStep(Page); + } + catch + { + OnStarterKitDesignInstalled(); + } } else { diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs index e1724981c4..c338143941 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKits.ascx.cs @@ -10,8 +10,19 @@ using System.IO; namespace umbraco.presentation.install.steps.Skinning { + public delegate void StarterKitInstalledEventHandler(); + public partial class loadStarterKits : System.Web.UI.UserControl { + + public event StarterKitInstalledEventHandler StarterKitInstalled; + + protected virtual void OnStarterKitInstalled() + { + StarterKitInstalled(); + } + + private cms.businesslogic.packager.repositories.Repository repo; private string repoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66"; @@ -102,8 +113,15 @@ namespace umbraco.presentation.install.steps.Skinning library.RefreshContent(); Helper.setProgress(100, "Starter kit has been installed", ""); - ((skinning)Parent.Parent.Parent.Parent.Parent).showStarterKitDesigns(kitGuid); + try + { + ((skinning)Parent.Parent.Parent.Parent.Parent).showStarterKitDesigns(kitGuid); + } + catch + { + OnStarterKitInstalled(); + } } else { diff --git a/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx b/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx index 768c40bc39..17483f8591 100644 --- a/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx +++ b/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx @@ -60,7 +60,9 @@ - + +

Installation completed succesfully

+
diff --git a/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.cs b/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.cs index 3dc8b6d798..b9509b4d29 100644 --- a/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.cs +++ b/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.cs @@ -20,25 +20,51 @@ namespace umbraco.presentation.umbraco.developer.Packages private void showStarterKits() { - ph_starterkits.Controls.Add(new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx")); + install.steps.Skinning.loadStarterKits starterkitsctrl = + (install.steps.Skinning.loadStarterKits)new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKits.ascx"); + starterkitsctrl.StarterKitInstalled+=new install.steps.Skinning.StarterKitInstalledEventHandler(starterkitsctrl_StarterKitInstalled); + + ph_starterkits.Controls.Add(starterkitsctrl); + + StarterKitNotInstalled.Visible = true; StarterKitInstalled.Visible = false; } + + public void showSkins(Guid starterKitGuid) { + install.steps.Skinning.loadStarterKitDesigns ctrl = (install.steps.Skinning.loadStarterKitDesigns)new UserControl().LoadControl(SystemDirectories.Install + "/steps/Skinning/loadStarterKitDesigns.ascx"); ctrl.ID = "StarterKitDesigns"; ctrl.StarterKitGuid = starterKitGuid; - + ctrl.StarterKitDesignInstalled += new install.steps.Skinning.StarterKitDesignInstalledEventHandler(ctrl_StarterKitDesignInstalled); ph_skins.Controls.Add(ctrl); StarterKitNotInstalled.Visible = false; StarterKitInstalled.Visible = true; } + + void starterkitsctrl_StarterKitInstalled() + { + StarterKitNotInstalled.Visible = false; + StarterKitInstalled.Visible = false; + + installationCompleted.Visible = true; + + } + + void ctrl_StarterKitDesignInstalled() + { + StarterKitNotInstalled.Visible = false; + StarterKitInstalled.Visible = false; + + installationCompleted.Visible = true; + } } } \ No newline at end of file diff --git a/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.designer.cs b/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.designer.cs index 9d6fd33140..2b5787e1d5 100644 --- a/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.designer.cs +++ b/umbraco/presentation/umbraco/developer/Packages/StarterKits.aspx.designer.cs @@ -74,5 +74,14 @@ namespace umbraco.presentation.umbraco.developer.Packages { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.PlaceHolder ph_starterkits; + + /// + /// installationCompleted control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.Pane installationCompleted; } }