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'll try my best to describe this problem as it is quite tedious.

We have a sharepoint solution, in where we create Columns that are deployed through a feature. I added my custom columns to a custom Content Type. I then created my custom content type and declared all the field refs pointing to my fields inside my Columns.

I then used a already created Page Layout(not sure that the proper name in English) and included my Content Type inside its Element.xml

<File Path="PageLayouts\MJQ.Nouvelles.aspx" Type="GhostableInLibrary" Url="Layouts/News.aspx" >
  <Property Name="Title" Value="News Page layout" />
  <Property Name="ContentType" Value="$Resources:cmscore,contenttype_pagelayout_name;" />
  <Property Name="PublishingPreviewImage" Value="~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/CustomPageLayout.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/CustomPageLayout.png" />
  <Property Name="PublishingAssociatedContentType" Value=";#News;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D00e1e2e3c8d71f4691bde302155bcf8a3200989a54f7a68341688674117f80da45f1;#"/>
</File>

The GUID properly reflects the GUID of my ContentType.

The problem here is when i create a Publishing page with Page Layout as my Content Type, i cannot see the Content Type's field inside my Application page "News.aspx".

this is added inside the News.aspx

<wss:RichHtmlField ID="txtTitre" runat="server" FieldName="MyCustomField" />

When i look inside the sharepoint site, into site columns i can see them, my content type also shows in the site content type.

When i also go to my page's library setting i can see the content type but the fields are missing.

Help :'(

share|improve this question
    
Also when i use "Add from existing site columns" inside the site's library it puts the right field inside the column section in doubles and it then shows on my page correctly. –  Dr.Denis McCracleJizz Feb 29 '12 at 17:51
add comment

3 Answers 3

One of the more annoying aspects of custom content types is that if you change a content type once it has been deployed, the redeploy of the updated solution containing the content type will not push those changes out to existing lists that use that content type. The changes will be correctly reflected in Site Content Types but not anywhere where that type is in use.

One way to get them to appear is to manually add the Site Columns that make up the Content Type to the existing list. When you do this, it will correctly realize that the Site Column being added is part of the content type and associate it properly.

share|improve this answer
    
Okay thanks, now i know what to do :) –  Dr.Denis McCracleJizz Feb 29 '12 at 18:54
2  
The reason for this is that you are only changing the schema, not the instance. Use featureupgradeactions to add fields to content types. What Dave suggests is actually unsupported, NEVER change a schema only and then modify your site to match it. –  Colin Feb 29 '12 at 19:08
1  
@Colin Agreed. I was merely offering it as a way to solve his immediate problem. A properly configured feature upgrade is the best long-term option. –  Dave Wise Feb 29 '12 at 19:37
    
I understand, but where do i use featureupgradeactions ?? –  Dr.Denis McCracleJizz Feb 29 '12 at 20:19
    
Here is a good place to start : sharepointnutsandbolts.com/2010/06/… –  Dave Wise Feb 29 '12 at 20:23
show 1 more comment
up vote 0 down vote accepted

Ok like the above comments say. I found the actual way to fix it. Simply delete all page of the said content type, go to the page list of the publishing site, delete the columns of the content type, delete the content type, next time you publish it will redeploy the content type with updated fields.

share|improve this answer
add comment

I did something similar where I added the content type to another temporary site 'Pages' library, used the 'Manage Content and Structure' page to move the pages from the old site to the temporary site, deleted the Content type from the old site, re-added the content type, then moved the pages back using 'Manage Content and Structure'.

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.