0

I am getting the following error only in Experience Editor :

enter image description here

The code associated is :

<div class="about-text">
     @Html.Sitecore().Field("{B5C0D199-7FFF-4B7A-A158-4D41DCAC81A0}", Model.Item) 
  </div>

I have also tried rendering the field using Field name instead of GUID, but still no luck. I even tried disabling Is XHTML global rule from /sitecore/system/Settings/Validation Rules/Field Types/Rich Text , even that's not working.

Can anyone pls provide me some assistance?

Thanks in advance.

2
  • And what is the content of that field? Jun 2 at 14:32
  • It's a Rich Text Field, so it contains a markup in HTML Jun 6 at 15:46
2

This is known bug from Sitecore, see link - https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB0365101

Experience Editor/Page Editor may stop working correctly and not allow to edit item fields on the content pages that generate invalid HTML markup.

Above Sitecore link states -

A few examples of such markup:

1. Item presentation contains nested components that both render <p> tags, resulting in the HTML markup like this:
   <p>My <p>text</p> which gives trouble</p>

2. <div> tags being nested inside <p> tags:
   <p>This is a text block <div>but this one is a container</div></p>

3. Unclosed <div> tags:
   <div><p>Lots of data included here</p><div>But the outer div is not closed</div>

Ensure that Sitecore items generate valid HTML markup. It is possible to use HTML validation in Microsoft Visual Studio or W3C Markup Validation Service.

Note: Some of the issues with invalid markup were fixed in Sitecore 8.0 Update-6 and 8.1 Update-1. However, please avoid using invalid markup all the same.

You can also follow - XHTML markup is incorrect near placeholder "header" Error, only for "header" key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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