I saw thisarticle in the link below and I wonder if you could help me with some questions I have
http://msdn.microsoft.com/en-us/library/ee330223(v=office.12).aspx
In our current project, which we didn’t not develop but we have to maintain, we are facing some issues, it looks like the first time the other firm developed the content types, they were done fine, using xml definitions, creating list templates and list instances was also done fine and in an organized way.
However at some point in time and after the content types and lists were already running on production, some changes had to be done (adding new fields to existing content types, changing translations of displayname or groupname, changing properties like required, showinnewform, showineditform, etc)
Across the internet I have found that many people have problems with unghosted content types, which means that the content type is detached from its XML definition, as far as I know this happens when somebody modified the child content type or list using the UI.
I am trying to collect a list of best practices for managing content types after they are deployed:
1.How to add a new field to an existing content type?
For this we have used UpgradeActions and AddFieldRef
2.How to remove an existing field from a content type?
For this, we haven’t needed it yet, but I have see that there also exist the RemoveFieldRef element which could be used inside UpgradeActions
3.How to reorder fields in a content type?
We do this by code in a custom upgrade action.
4.How to change a translation in an existing field?
We do this by code in a custom upgrade action.
5.How to change properties like ShowInDisplayForm, ShowInNewForm, Hidden, Required, etc.
We do this by code in a custom upgrade action.
I wonder if my list above specially points 3,4 and 5 can be called best practices, or if I am missing something or doing something wrong? Why? A few weeks ago we had a lot of problems, when doing changes via code and pushing down the changes was not working, the changes were not pushed(we were not seeing the changes in the lists). After reading for many hours, I saw that this might be possible due to that the list content type LINK is broken from its Parent content type definition.
I found that a way to restablish this link can be done using SQL but it’s not supported of course.
http://www.olavaukan.com/2010/10/content-types-can-be-unghosted-too/
Maybe somebody can guide me in the right direction?