嘗試轉到我網站上的頁面,出現空白屏幕並決定嘗試使用Visual Studio 2012加載並調試它,現在我得到這個錯誤時的頁面加載:在cms.dll中發生類型'System.ArgumentException'的異常,但未在用戶代碼中處理
An exception of type 'System.ArgumentException' occurred in cms.dll but was not handled in user code
並指向下面的代碼在HeaderControl.ascx.cs
:
else if(new umbraco.cms.businesslogic.template.Template((Context.GetContent()).template).Alias == "TemplateLanguage")
此代碼是以下方法中:
public void LoadData()
{
_Location = HttpContext.Current.GetLocation();
if (Context.GetContent().NodeTypeAlias == "Home")
{
TheHomeHeaderPH.Visible = true;
ThePhonePH.Visible = true;
_MenuStyle = "var-nav nav-large";
LoadMenuTopControl();
LoadMenuMainControl();
}
else if(new umbraco.cms.businesslogic.template.Template((Context.GetContent()).template).Alias == "TemplateLanguage")
{
TheContentHeaderPH.Visible = true;
_MenuStyle = "nav-small";
LoadContentMenuTopControl();
LoadMenuLanguageControl();
}
else
{
MMG.BusinessLayer.Content theContent = MMG.BusinessLayer.Content.GetCached(Context.GetContent());
if (theContent.TemplateColor == "168C9C")
{
TheHomeHeaderPH.Visible = true;
_MenuStyle = "nav-small";
LoadMenuTopControl();
LoadMenuMainControl();
}
else
{
TheContentHeaderPH.Visible = true;
LoadContentMenuTopControl();
LoadContentMenuMainControl();
}
}
}
我該如何解決這個問題? System.ArgumentException
這樣說:{"No node exists with id '0'"}
您使用的是哪種版本的Umbraco? –