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 created site content type element and write some text into Description attribute. I deploy it (as farm solution). When I look at this content type in Site Content types section, I found that description is replaced by some default description.

BUT if I get description by powershell, it is ok - my custom description.

What is wrong here? I want to see my custom description in UI.

I tried this on two different computers/sharepoints and both with same result.


Here is some code if you want.

Content type definition is the default one, from Visual Studio 2010 ContentType template:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Položka (0x01) -->
    <ContentType ID="0x010000daa0d599fb4c4bbf60a844cf20c354"
           Name="CTwDescription - ContentType1"
           Group="Custom Content Types"
           Description="My Content Type"
           Inherits="TRUE"
           Version="0">
        <FieldRefs>
        </FieldRefs>
    </ContentType>
</Elements>

Powershell code to get the right description:

$w = Get-SPWeb http://localhost
$ct = $w.ContnetTypes["CTwDescription - ContentType1"]
$w.Description
share|improve this question
add comment

1 Answer

How do you deploy it (Site or Web)? You would also need to set Inherits="FALSE" which gives you total freedom on its definition. Also, make sure is not already in use when you deploy/re-deploy it as it might be that the updates would not be pushed to all children.

share|improve this answer
    
I have the default template for ContentType from Visual Studio => Web scoped feature, first time deploy through VS, no usage of it and I am checking site content types not list content type. Inherits="FALSE" gives mi the Description to UI. But why it was already in object model with Inherits="TRUE" (and not showing in UI)??? –  jumbo Jun 28 '12 at 12:01
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.