4

We recently upgraded to Sitecore 9.0 Update-1 from Sitecore 8.2 update 2. When accessing one of the pages in Experience Editor, we get the following error for one of the renderings used for page banner:

   
> 10524 11:48:06 WARN  Could not find type in
> ReflectionUtil.CreateObject: Sitecore.Web.UI.XslControls.ContentDot
>     10524 11:48:06 WARN  Could not instantiate xsl control object (tag: 'sc:dot', assembly: 'Sitecore.Kernel', type:
> 'Sitecore.Web.UI.XslControls.ContentDot')
>     ManagedPoolThread #1 11:48:07 INFO  Job started: Sitecore.ListManagement.Operations.UpdateListOperationsAgent
>     ManagedPoolThread #1 11:48:07 INFO  Job ended: Sitecore.ListManagement.Operations.UpdateListOperationsAgent (units
> processed: )
>     10524 11:48:07 ERROR Failed to render rendering
>     Exception: System.Xml.XmlException
>     Message: The ' ' character, hexadecimal value 0x20, cannot be included in a name.
>     Source: System.Xml
>        at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
>        at System.Xml.XmlQualifiedName.Verify()
>        at System.Xml.Xsl.XsltArgumentList.AddParam(String name, String namespaceUri, Object parameter)
>        at Sitecore.Mvc.Presentation.XsltRenderer.AddParameters(XsltArgumentList
> arguments)
>        at Sitecore.Mvc.Presentation.XsltRenderer.GetArguments()
>        at Sitecore.Mvc.Presentation.XsltRenderer.Render(TextWriter writer)
>        at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer
> renderer, TextWriter writer, RenderRenderingArgs args)

This rendering has personalization rules applied to it, but other renderings (with/without personalization) seems to work just fine.

Edit: Using personalisation, by default the rendering content is hidden and is shown only when a rule is true. Looking in the experience editor the issue comes when the default (hide) rule is shown. Selecting the other rule, the rendering works just fine.

3
  • Is this an XSLT rendering? Commented Feb 21, 2018 at 2:52
  • My understanding of this so far is that, when by default you try to hide a rendering using personalization, Sitecore places a hidden rendering in place of the current rendering. This issue comes when this rendering is getting rendered. One of the parameters being passed to it contains an invalid value, and that is where it fails. Commented Feb 21, 2018 at 5:51
  • @GeorgeChang, to answer your question, the rendering for which I get the error is a view rendering. It is the replacing hidden rendering which I believe is XSLT based. Commented Feb 21, 2018 at 9:23

3 Answers 3

6

I had the same problem. This was resolved by removing spaces in the field names of my rendering parameters.

Sample

Input

  1. Rendering with configured personalization has a hidden state
  2. The rendering has at least one rendering parameter with spaces in field name like "Mobile Width"

Output

Error Rendering Xslt: /xsl/system/webedit/hidden rendering.xslt: The ' ' character, >hexadecimal value 0x20, cannot be included in a name.

The simplest solution

Get rid of spaces in the rendering parameters fields, like "Mobile Width" => "MobileWidth"

Reason

If rendering has hidden state then sitecore displays Hidden Rendering located on the following path /sitecore/layout/Renderings/System/WebEdit/Hidden Rendering.

The rendering is a Xsl rendering that's why an instance of XsltRender will be passed to the first argument of Render method of ExecuteRenderer processor and will be used in the following calls.

at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)
at System.Xml.XmlQualifiedName.Verify()
at System.Xml.Xsl.XsltArgumentList.AddParam(String name, String namespaceUri, Object parameter)
at Sitecore.Mvc.Presentation.XsltRenderer.AddParameters(XsltArgumentList arguments)
at Sitecore.Mvc.Presentation.XsltRenderer.GetArguments()
at Sitecore.Mvc.Presentation.XsltRenderer.Render(TextWriter writer)
at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)

Then all necessary information is added to xslt argument list including data from each rendering parameter

at Sitecore.Mvc.Presentation.XsltRenderer.AddParameters(XsltArgumentList arguments)

Before adding each key, it is checked that the name is a valid NCName as recommended by the W3C Extended Markup Language. It's cannot contain any whitespaces, that's why it throws an exception

at System.Xml.XmlConvert.VerifyNCName(String name, ExceptionType exceptionType)

5

Your issue may be in your Sitecore.config file. The sc:dot XSL rendering was deprecated in 8.2 but still had some references in the Sitecore.config file, specifically in the sitecore/xslExtensions and sitecore/xslControls nodes.

Sitecore 8.2

<xslExtensions>
    <extension mode="on" type="Sitecore.Xml.Xsl.XslHelper, Sitecore.Kernel" namespace="http://www.sitecore.net/sc" singleInstance="true" />
    <extension mode="on" type="Sitecore.MainUtil, Sitecore.Kernel" namespace="http://www.sitecore.net/util" singleInstance="true" />
    <extension mode="on" type="Sitecore.DateUtil, Sitecore.Kernel" namespace="http://www.sitecore.net/dateutil" singleInstance="true" />
    <extension mode="on" type="Sitecore.Web.UI.WebControls.ContentDot, Sitecore.Kernel" namespace="http://www.sitecore.net/dot" singleInstance="true" />
    <extension mode="on" type="Sitecore.Xml.Xsl.SqlHelper, Sitecore.Kernel" namespace="http://www.sitecore.net/sql" singleInstance="true" />
    <extension mode="on" type="Sitecore.StringUtil, Sitecore.Kernel" namespace="http://www.sitecore.net/stringutil" singleInstance="true" />
</xslExtensions>
<xslControls>
    <control mode="on" tag="sc:date" type="Sitecore.Web.UI.XslControls.Date" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:dot" type="Sitecore.Web.UI.XslControls.ContentDot" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:html" type="Sitecore.Web.UI.XslControls.Html" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:image" type="Sitecore.Web.UI.XslControls.Image" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:link" type="Sitecore.Web.UI.XslControls.Link" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:memo" type="Sitecore.Web.UI.XslControls.Memo" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:sec" type="Sitecore.Web.UI.XslControls.Security" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:text" type="Sitecore.Web.UI.XslControls.Text" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:wordstyle" type="Sitecore.Web.UI.XslControls.WordStyle" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:enableSecurity" type="Sitecore.Web.UI.XslControls.EnableSecurity" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:disableSecurity" type="Sitecore.Web.UI.XslControls.DisableSecurity" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:editFrame" type="Sitecore.Web.UI.XslControls.EditFrame" assembly="Sitecore.Kernel" />
</xslControls>

Sitecore 9.0.1

<xslExtensions>
    <extension mode="on" type="Sitecore.Xml.Xsl.XslHelper, Sitecore.Kernel" namespace="http://www.sitecore.net/sc" singleInstance="true" />
    <extension mode="on" type="Sitecore.MainUtil, Sitecore.Kernel" namespace="http://www.sitecore.net/util" singleInstance="true" />
    <extension mode="on" type="Sitecore.DateUtil, Sitecore.Kernel" namespace="http://www.sitecore.net/dateutil" singleInstance="true" />
    <extension mode="on" type="Sitecore.Xml.Xsl.SqlHelper, Sitecore.Kernel" namespace="http://www.sitecore.net/sql" singleInstance="true" />
    <extension mode="on" type="Sitecore.StringUtil, Sitecore.Kernel" namespace="http://www.sitecore.net/stringutil" singleInstance="true" />
</xslExtensions>
<xslControls>
    <control mode="on" tag="sc:date" type="Sitecore.Web.UI.XslControls.Date" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:dot" type="Sitecore.Web.UI.XslControls.ContentDot" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:html" type="Sitecore.Web.UI.XslControls.Html" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:image" type="Sitecore.Web.UI.XslControls.Image" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:link" type="Sitecore.Web.UI.XslControls.Link" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:memo" type="Sitecore.Web.UI.XslControls.Memo" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:sec" type="Sitecore.Web.UI.XslControls.Security" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:text" type="Sitecore.Web.UI.XslControls.Text" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:wordstyle" type="Sitecore.Web.UI.XslControls.WordStyle" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:enableSecurity" type="Sitecore.Web.UI.XslControls.EnableSecurity" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:disableSecurity" type="Sitecore.Web.UI.XslControls.DisableSecurity" assembly="Sitecore.Kernel" />
    <control mode="on" tag="sc:editFrame" type="Sitecore.Web.UI.XslControls.EditFrame" assembly="Sitecore.Kernel" />
</xslControls>

You'll notice that the Sitecore 9 xslExtensions configuration node has had the Sitecore.Web.UI.WebControls.ContentDot reference removed. This is because that class has been removed entirely from Sitecore.Kernel.dll where as it was only marked as deprecated in 8.2.

The first 2 warnings in your log snippet...

10524 11:48:06 WARN Could not find type in ReflectionUtil.CreateObject: Sitecore.Web.UI.XslControls.ContentDot`
10524 11:48:06 WARN Could not instantiate xsl control object (tag: 'sc:dot', assembly: 'Sitecore.Kernel', type: 'Sitecore.Web.UI.XslControls.ContentDot')

...actually shows up in a fresh install of 9.0.1! This is likely due to this line in sitecore/xslControls:

<control mode="on" tag="sc:dot" type="Sitecore.Web.UI.XslControls.ContentDot" assembly="Sitecore.Kernel" />

I'm guessing that if you want to get rid of that warning, you can remove this line as well since Sitecore.Web.UI.XslControls.ContentDot no longer exists.

I would double check to make sure that during your upgrade you have removed the line from sitecore/xslExtensions in your Sitecore.config file. It's also probably safe to remove the one in sitecore/xslControls as well.

2
  • Thank you for sharing the details. I tried removing the control from the config. The warnings are gone now, but the error is still there. Commented Feb 23, 2018 at 6:28
  • I am also getting same error. Could you please provide resolution for this? Commented Feb 15, 2019 at 4:49
0

Possible solution (didn't test it yet): https://markgibbons25.medium.com/personalisation-error-in-cm-on-hide-condition-51e919f1ca51#:~:text=Error%20Rendering%20Xslt%3A%20%2Fxsl%2F,characters%20in%20the%20field%20name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.