Wednesday, February 2, 2011

How to apply changes to fields in an existing page layout content type which is in use.

Seems to be very straight forward to do, but I came across lot of trouble doing this and thought it is worth to share it with you all.

 

I had a multi lookup field name topics in my page layout content type which retrieve data from a share point list.

Initially my lookup field allow only 255 characters. So the problem was when  the number of topics are large, if I try to add more topics it will give an error saying

 

This field can have no more than 255 characters.

 

So as a workaround for that I add the lookup field attribute UnlimitedLengthInDocumentLibrary=”true” and redeploy it.

But the error was still there.

Then I delete all the pages that were referring to my page layout and then delete the page layout and deactivate the content type.

Then I reactivate the content type and restore the page layout and pages. But the error was still there.

 

Workaround

Here is the solution that I come up with. Even though you deactivate and activate the content type , somehow it reference to the old field definition.

In order to overcome this

1.      go to the site content types-> select the relevant content type

2.       select the field on which you did  the modification

3.       click on edit site column

4.       then do nothing. Yes do nothing and click ok.

5.       You are done!

 

1 comment:

  1. This is because SharePoint doesn't recognize the changes in content type. You have to propagate the changes. In order to propagate the content type, either you have to go to the content type gallery and press the OK button (that's what you have done) or you have to go for the tool to propagate it (http://blog.falchionconsulting.com/index.php/2008/05/propagate-content-type-changes/). Anyhow, thanks for your experiment.

    ReplyDelete