sitecoresitecore8sitecore-mvcexperience-editor

Sitecore Experience editor showing raw JSON data


I am using a simple MVC sitecore project. I just given only one field in rendering page. When i try to view in "Experience Editor" its showing some raw JSON Data like below.enter image description here

I have used this post

to solve this. when i include that webedit.css in my main layout then the Raw data vanished. But i am not able to see the Editing Ribbon. But when i choose Experience Editor from desktop its showing all Default contents correctly along with the editing Ribbon(Default Page).

Can anyone tell me why i am not able to see that editing ribbon on my page?


Solution

  • This is because your layout razor cshtml file has valid HTML markup skeleton in place. Please make sure at the very minimum your page is formatted like this:

    @using Sitecore.MVC
    
    <html>
        <body>
             @Html.Sitecore().Etc...
             etc...
        </body>
    </html>
    

    This should eliminate the big chunk of JSON on top and enable all page editor UI elements.