1
votes

I get the following error message when trying to add a placeholder to a layout in Sitecore 6.5:

"Empty strings are not allowed.<br>Parameter name: xml"

Any idea what could be the problem? The following stack trace appears in the log:

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)
2
I am not on this site, but they do use it at the place where I work sometimes. This site did begin as a clone of a site using the CIG. - Iucounu
Do you get any other information? Stack trace would be helpful - Marek Musielak
@Maras Musielak: No, that's the full content of the error message from the dialog box. No stack trace. - Iucounu
@Maras Musielak: I found a stack trace in the log, and have added it above. Thanks! - Iucounu

2 Answers

1
votes

I encountered this issue and found the source of the issue to be the settings InvalidItemNameChars and ItemNameValidation being blank in the web.config.

I have removed the values to import a packages with invalid characters as soon as I restored the values to the Default values, shown below, the exception stopped occurring.

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

<setting name="ItemNameValidation" value="^[\w\*\$][\w\s\-\$]*(\(\d{1,}\)){0,1}$" />
0
votes

Most commonly, this has to do with your language settings. Like for instance; if your user (via the default Content Language) is set to edit items in a language, the current item you are editing does not have a language specific version for.

So for instance; you're on an item that exists in "en" - and the user you are logged in as; defaults to "da-DK" - AND the current item does not have a version in "da-DK".

I've not seen this bug in a long while though, I would have thought it fixed.

It might not be this issue at all, but it's really hard to tell from the limited information you have on the issue.

Take a look at your user settings; also if there's any "ContentLanguage" attributes defined in your site definition that might not be what you expect.