4

I am randomly facing below error while checking out the component in SDL Tridion 2013.

Error - It is not possible to check-out a shared item

Stack Trace - at Tridion.ContentManager.ContentManagement.VersionedItem.OnCheckingOut(CheckOutEventArgs eventArgs) at Tridion.ContentManager.ContentManagement.VersionedItem.CheckOut(LockType lockType, Boolean completeTransactionOnFailure) at Tridion.ContentManager.ContentManagement.VersionedItem.CheckOut(Boolean permanentLock) at RREvent_System.MainClass.ProcessCaseStudyPageForPublish(Page page, TcmUri pubTargUri) in e:\EventSystem\MainClass.cs:line 627

I have written code like below.

 //component is type of Component
 if (component.IsCheckedOut)
 {
    component.CheckIn(true);
 }

 component.CheckOut(true);

 //Code to update component fiedls

 component.Save(true);     
 component.CheckIn(true);

Pls help.

Thanks.

6

You are trying to checkout an item which is a shared.

To overcome this, you need to check an item is shared then localize and checkout an item.

1
  • 4
    Or edit the component from the "Owning" Publication instead, if you don't want to localize it. – Nuno Linhares Mar 13 '14 at 12:55
6

You are probably trying to check out a component that is blueprinted from a higher publication. You should check to see if its shared before checking it out:

if (component.IsShared)
{
   //either ignore, or check the component out in the owning publication (component.OwningRepository)
}

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.