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

I have created 80 content types. some of them are inherited from some other content types. I have placed all the content types in feature in such an order that parent content types are at top. But when I deploy solution. I get this error:

Error 45 Error occurred in deployment step 'Activate Features': The parent content type specified by content type identifier 0x0101 does not exist.

Any Idea how to solve this ??

share|improve this question
    
Error says it all, there must be something that content depends on and doesn't exists, use ULS viewer to capture inside errors maybe. –  Muhammad Raja Mar 10 '13 at 0:37
    
Do your custom content types that inherit from Document (0x0101) have an ID that is preceded with a 00? ie: 0x010100[some guid here]. –  James Love Mar 10 '13 at 19:37
    
yes my custom CTs preceded with a 0x01010 –  SPBeginer Mar 11 '13 at 9:30
add comment

2 Answers 2

up vote 2 down vote accepted

Find the ID of the content type you are deriving from (in your case it is 0x0101 i.e. Document Content Type). So, make sure 0x0101 is present by examining the content type in the SharePoint UI (Site Settings > Manage Content Types). You'll get an exception (as you're getting right now) on feature activation if it's not, or the Inheritance between Content Type is not being correctly set up.

Having said about inheritance:

For any child content types IDs, you can simply add '01' or '02' to the ID generated in the previous step. It is definitely not necessary to append '00' and another GUID. This will simplify the content types IDs generation process in such large scale developments.

share|improve this answer
2  
It's not necessary but it's a standard convention that most developers adhere to. Sure, it's something you can miss out between declarations and usages so things can break, but as long as you and your team always uses the 00 or not and they stick to the teams agreed standard, all should be fine. Also, you can't really guarantee some other dev is gonna try and use 01 or 02 at the end as they develop theirs at the same time as yours. –  James Love Mar 10 '13 at 21:32
1  
OO separator is required if the suffix being added to the ID is a GUID and to make it unique (agree with the fact being used by most of developers) but the 01 and 02 approach makes it much more simple to generate unique IDs in large scale development. I myself use OO in most of implementations but expect developers to know both :) –  Falak Mahmood Mar 10 '13 at 21:45
add comment
stsadm -o activatefeature -filename publishingresources\feature.xml –url siteurl  -force
share|improve this answer
add comment

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.