Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
3  
Or edit the component from the "Owning" Publication instead, if you don't want to localize it. –  Nuno Linhares Mar 13 at 12:55

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)
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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