1

在 Sitecore 6.5 中尝试将占位符添加到布局时,我收到以下错误消息:

"不允许使用空字符串。<br>参数名称:xml"

知道可能是什么问题吗?以下堆栈跟踪出现在日志中:

1124 10:20:56 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_default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\59ed33b7\d6112557\App_Web_edgk4py3.1.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 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters)
   at Sitecore.Reflection.ReflectionUtil.CallMethod(Object obj, String methodName, Boolean includeNonPublic, Boolean includeInherited, Object[] parameters)
   at Sitecore.Web.UI.HtmlControls.Component.HandleMessage(Message message)
   at Sitecore.Shell.Framework.Commands.ClientEventCommand.SendEventMessage()
   at Sitecore.Shell.Framework.Commands.ClientEventCommand.Execute(CommandContext context)
   at Sitecore.Web.UI.Sheer.ClientPage.RaiseEvent()
   at Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Nested Exception

Exception: System.ArgumentException
Message: Empty strings are not allowed.
Parameter name: xml
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.ArgumentNotNullOrEmpty(String argument, String argumentName)
   at Sitecore.Layouts.LayoutDefinition.Parse(String xml)
   at Sitecore.Shell.Applications.Layouts.DeviceEditor.DeviceEditorForm.OnOK(Object sender, EventArgs args)
4

2 回答 2

1

我遇到了这个问题,发现问题的根源是 web.config 中的设置InvalidItemNameCharsItemNameValidation空白。

将值恢复为默认值后,我已删除这些值以导入包含无效字符的包,如下所示,异常停止发生。

<setting name="InvalidItemNameChars" value="\/:?&quot;&lt;>|[]" />

<setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$" />
于 2015-03-25T19:38:36.590 回答
0

最常见的是,这与您的语言设置有关。比如说;如果您的用户(通过默认内容语言)设置为以某种语言编辑项目,则您正在编辑的当前项目没有特定于语言的版本。

例如,您正在使用“en”中存在的项目 - 以及您登录的用户;默认为“da-DK”-并且当前项目在“da-DK”中没有版本。

不过,我已经很久没有看到这个错误了,我本以为它已经修复了。

可能根本不是这个问题,但是从您对这个问题的有限信息中很难判断。

查看您的用户设置;此外,如果您的站点定义中定义的任何“ContentLanguage”属性可能不是您所期望的。

于 2013-09-06T15:28:25.847 回答