2015-07-10 65 views
0

現在唯一的目標是運行Sitecore頁面編輯器而不會出現問題。這個錯誤來自以下網址:當頁面編輯器啓用時,Sitecore:參數超出範圍

http://localhost/sitecore/shell/Applications/WebEdit/WebEditRibbon.aspx?db=master&id={guid}&la=en&vs=1&url=%2F&mode=edit&sc_pagesite=website&trf=%2Ftemp%2Fdiagnostics%2Ftrace_{guid}.xml&prf=%2Ftemp%2Fdiagnostics%2Fprofile_{guid}.xml&dev={guid} 

我得到這個例外,當我打開任何頁面與頁面編輯器啓用:

16028 13:57:46 ERROR Application error. 
Exception: System.Web.HttpUnhandledException 
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown. 
Source: System.Web 
    at System.Web.UI.Page.HandleError(Exception e) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
    at System.Web.UI.Page.ProcessRequest() 
    at System.Web.UI.Page.ProcessRequest(HttpContext context) 
    at ASP.sitecore_shell_applications_webedit_webeditribbon_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\3d565cb3\44f479ba\App_Web_pyaedh12.0.cs:line 0 
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 

Nested Exception 

Exception: System.Reflection.TargetInvocationException 
Message: Exception has been thrown by the target of an invocation. 
Source: mscorlib 
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 
    at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
    at Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Boolean includeStatic, Object[] parameters) 
    at Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e) 
    at System.Web.UI.Control.LoadRecursive() 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

Nested Exception 

Exception: System.ArgumentOutOfRangeException 
Message: startIndex cannot be larger than length of string. 
Parameter name: startIndex 
Source: mscorlib 
    at System.String.Substring(Int32 startIndex, Int32 length) 
    at Sitecore.Links.LinkProvider.LinkBuilder.GetItemPathElement(Item item, SiteInfo site) 
    at Sitecore.Links.LinkProvider.LinkBuilder.BuildItemUrl(Item item) 
    at Sitecore.Links.LinkProvider.GetItemUrl(Item item, UrlOptions options) 
    at Sitecore.Providers.LinkProvider.GetItemUrl(Item item, UrlOptions options) 
    at Sitecore.Web.WebEditUtil.GetItemUrl(Item item) 
    at Sitecore.Shell.Applications.WebEdit.WebEditRibbonForm.RenderTreecrumbGo(HtmlTextWriter output, Item item) 
    at Sitecore.Shell.Applications.WebEdit.WebEditRibbonForm.RenderTreecrumb(Item item) 
    at Sitecore.Shell.Applications.WebEdit.WebEditRibbonForm.OnLoad(EventArgs e) 

頁面呈現罰款時,頁面編輯器被禁用。

運行版本:

  • Sitecore的7.2。
  • ASP.NET MVC 5.2.3(也試過5.1.3)。

我試着刪除任何與佈局/渲染中的Sitecore相關的東西,但是仍然出現該錯誤。我意識到,如果沒有看到配置文件,就不可能知道發生了什麼,但是希望以前有人偶然發現了這個錯誤!

謝謝!

+0

這是文字網址嗎?其中沒有任何實際的GUID,這將是一個問題。另外,您正在編輯的網站在web.config中稱爲「網站」? –

+0

不,它不是字面的URL,我只是「隱藏」了GUID。是的,這是一個名爲「網站」,我已經改變了rootPath屬性爲'/ sitecore/content/foo/bar'。 –

回答

1

問題是rootPath屬性。看起來它不可能是/sitecore/content以下的兩個級別。當我從/sitecore/content/foo/bar更改爲/sitecore/content/foo它再次工作。希望Sitecore老兵能解釋爲什麼這是!