We've developed a custom Sharepoint feature with almost everything in it (custom columns, custom content types, custom master page, custom page layouts, etc). Everything is working fine, but I'm facing two main consistency problems in the going to production phase that I'm not able to resolve:
- If someone by mistake delete one of the lookup list in the root web, I've created an event receiver to create it again, and it works fine but it broke the link between it and the custom content type in the subsites. There's no proper way I found to reset it and make it work again I've developed a custom console application to reset the lookup definition (getting SPFieldLookup in the root site and resetting LookupList and LookupWebId, but i found the lookup was already set with the right GUID) and to get the content type of the subsite and trying to reset the FieldLink (deleting it from the FieldLinks collection of the content type and adding it again). Nothing works: neither deleting all the content of the subsite and removing/adding the content type (even if it's not a viable option for a producion environment). The only thing that works is deleting the subsite and let the feature create it again (and obviously is something I can't do in production!).
- If for any reason in a wave 2 or 3 in the development process I need to add a new Site column to an existing content type, I cannot manage to propagate the changes to the subsites. I see the new column in the root site, I see the content type in the root site with the new column, but in the lists in the subsites using that content type I always see the content type without the new column. No idea what to do here: the only thing that work is adding manually the column to the content type for each list using it: time consuming, and the column is added for EVERY content type in the list, not only the custom one.
If someone could advice would be great!