3

I am not able to edit the component in Experience manager, but I can edit in CME.

Also I can edit the page. But when trying to edit the component it shows the following error:

Editing Disabled: Editing this content has been explicitly disabled for all user.to enable editing this content , contact your sdl Application Administrator.

And refreshing the page sometimes I get the following error message:

You are not authorized to edit this component: Your System Administrator has not granted you the rights to modify this component.

I am using the System administrator credential to edit this feature.

This is the sample mark up that has been generated from my code.

<div class="container marketing">
    <div class="row"> 
            <div class="span4">
               <!-- Start Component Presentation: {"ComponentID" : "tcm:2033-4796", "ComponentModified" : "2015-10-27T12:10:40", "ComponentTemplateID" : "tcm:2033-4740-32", "ComponentTemplateModified" : "2015-10-22T11:37:35", "IsRepositoryPublished" : true} -->
                <!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:header[1]"} -->                      <h2>Ohh God</h2> 
                <!-- Start Component Field: {"XPath":"tcm:Content/custom:Content/custom:description[1]"} -->                    <p>god help me</p>

            </div>
        </div>    
   </div>

This is my Razor view code:

@model DD4T.ContentModel.IComponentPresentation;
@using DD4T.XPM; @using DD4T.Mvc.Html;
<div class="container marketing">
    <div class="row">
        <div class="span4">              
            @Html.SiteEditComponentPresentation(Model)
            @if (Model.Component.Fields.ContainsKey("write"))
            {
                var field = Model.Component.Fields["write"];
                @Html.SiteEditField(Model.Component, field)
                  <h2>@field.Value.ToString()</h2> 
            }                
            @if (Model.Component.Fields.ContainsKey("reviewerName"))
            {
                var field = Model.Component.Fields["reviewerName"];
                @Html.SiteEditField(Model.Component, field)
                <p>@field.Value.ToString()</p>
            }                
        </div>
    </div>   

Error while editing component

6

This does not look like valid Experience Manager Markup to me.

The <!-- Start Component Field --> HTML comments need to be within a separate block level element in order that XPM can display them properly, so I'd start by fixing that. I'd suggest placing them inside the <h2> and <p> tags, like this:

@model DD4T.ContentModel.IComponentPresentation;
@using DD4T.XPM; @using DD4T.Mvc.Html;
<div class="container marketing">
    <div class="row">
        <div class="span4">              
            @Html.SiteEditComponentPresentation(Model)
            @if (Model.Component.Fields.ContainsKey("write"))
            {
                var field = Model.Component.Fields["write"];
                <h2>
                    @Html.SiteEditField(Model.Component, field)
                    @field.Value.ToString()
                </h2> 
            }                
            @if (Model.Component.Fields.ContainsKey("reviewerName"))
            {
                var field = Model.Component.Fields["reviewerName"];
                <p>
                    @Html.SiteEditField(Model.Component, field)
                    @field.Value.ToString()
                </p>
            }                
        </div>
    </div>   

If that doesn't fully solve the issue, I'd check that the fields were configured as inline editable in the component's schema, like this:

Inline editable setting for Schema fields

Also check that the Component Template in use has inline editing enabled, like this:

Inline editing setting for Component Template

  • Thanks David. It was the CT where the Enable editing check box was not checked. – Manas.p Oct 28 '15 at 4:22
  • @Manas.p, You should accept David Forster answer if following that your issue got fixed.. – Mukesh Kumar Oct 28 '15 at 8:47
3

Can you double-check your Blueprint Context Settings have been set appropriately as well? Take a look at this post as well: On an Experience Manager website the UI loads but the component is not editable

Also documented here: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-DB96F4C4-1B66-4D1D-AC29-623CE23DDE38

  • I also thought it may be permissions/BluePrint related but discounted it as he states he is accessing as an Administrator. Still worth checking though! – David Forster Oct 27 '15 at 18:23

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.