Wraps masterpages selector in try/catch
to avoid exceptions if masterpage is missing for some reason
This commit is contained in:
@@ -59,11 +59,16 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
|
||||
MasterTemplate.Items.Add(li);
|
||||
}
|
||||
|
||||
if (_template.MasterTemplate > 0)
|
||||
MasterTemplate.SelectedValue = _template.MasterTemplate.ToString();
|
||||
try
|
||||
{
|
||||
if (_template.MasterTemplate > 0)
|
||||
MasterTemplate.SelectedValue = _template.MasterTemplate.ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MasterTemplate.SelectedValue = selectedTemplate;
|
||||
MasterTemplate.SelectedValue = selectedTemplate;
|
||||
|
||||
NameTxt.Text = _template.GetRawText();
|
||||
AliasTxt.Text = _template.Alias;
|
||||
|
||||
@@ -59,8 +59,14 @@ namespace umbraco.cms.presentation.settings
|
||||
AliasTxt.Text = _template.Alias;
|
||||
editorSource.Text = _template.Design;
|
||||
|
||||
if(_template.MasterTemplate > 0)
|
||||
MasterTemplate.SelectedValue = _template.MasterTemplate.ToString();
|
||||
try
|
||||
{
|
||||
if (_template.MasterTemplate > 0)
|
||||
MasterTemplate.SelectedValue = _template.MasterTemplate.ToString();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
|
||||
ClientTools
|
||||
.SetActiveTreeType(TreeDefinitionCollection.Instance.FindTree<loadTemplates>().Tree.Alias)
|
||||
|
||||
Reference in New Issue
Block a user