Design Manager fatal bug: deleted site columns.
Update 2013-09-07: The SharePoint Server 2013 CU of August 2013 and KB 2817607 seem to (partly) address the issue described in this article. If you tried and tested the update it let me know! From the support site:
When you export a design package from a SharePoint Server 2013 site, some out-of-box (OOB) fields are missing from the content types.
The last few weeks on our project have been a pain. Site columns were disappearing, content types lost fields, publishing features would not activate and ULS errors: ‘Failed to create the ‘Pages’ library’. The whole site collection felt unstable and threw the weirdest errors towards us. We were baffled until the we found the problem.
The man on trial? Design Manager!
At first it worked perfectly but after a few weeks the publishing feature began to act weird. It was impossible to (re)activate the Publishing feature. The activation was throwing exceptions ( ‘Failed to create the ‘Pages’ library’) and we noticed we were missing site columns and fields in our content types and lists. The first to blame was, of course, a developers dirty code.
After hours of troubleshooting we were able to pin down the problem to Design Manager. The problem occurs when you remove a design package that has page layouts configured with an associated (custom) content type. If you do this, all hell breaks lose. SharePoint starts to delete site columns, adjusts content types and your SharePoint setup is ready for the garbage bin.
You know you are in trouble when the Title field on the default Item content type is gone.
- Create a new site collection based upon the publishing template
- Deploy your custom content types first
- Go to Design Manager and upload your design package.
My design package contains page layouts with an associated content type
- Make an update and create a second version of your design package.
- Upload this second version to your environment as well
- You now have 2 design packages installed
Go to Site Settings -> Web Designer Galleries -> Solutions
- Here it comes.
Deactivate the old design package and activate the new version
- Delete the old version
And that’s it.
Here an overview of the errors introduced by this SP2013 Design Manager error.
If you go to your document or item content type. You notice that the Title field is gone.
An other indication is Site Settings -> Look and Feel -> Page Layouts and site templates. In the ‘New Page Default Settings’ all the associated content types have value ‘Invalid Associated Content Type’.
Reactivating the Publishing feature returned errors stating ‘Failed to created pages library’ while the pages library is already there.
The ‘page layout content’ types are gone.
The ULS logs contain the following error:
Event log message was: 'Failed to create the 'Pages' library.'. Exception was: 'Microsoft.SharePoint.SPException: Content type '0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF39' not found in web 'http://wingtipserver/sites/test6'. at Microsoft.SharePoint.Publishing.CommonUtilities.GetContentType(SPWeb web, SPContentTypeId contentTypeId) at Microsoft.SharePoint.Publishing.Internal.AreaProvisioner.CreatePagesDocumentLibrary(SPList approvalTaskList)'
At this point your SharePoint is missing critical components. As stated above this breaks default SharePoint functionality. I consider this error a major bug in SharePoint 2013. A designer can do major damage to your production setup by simply using default out-of-the-box functionality.
My advise is: do not use the Design Manager to package your files! I still like Design Manager but I copy the generated master pages and page layouts in a Visual Studio solution and deploy the solution.
I don’t dare to count the hours we lost on this error. Is it wise to deploy this corrupt content database on a production server? I do not think so. So I’m afraid our content editors have to redo all their work as well.
The only thing I can do is reach out to the community and warn everybody. Hopefully it helps at least some. If anybody has more information about this bug… contact me!
Some other references