Serious SharePoint

This means something, this is important!

Scenario: You are working in a site collection where the root site was instantiated from a web template.  You have then created subsites which you wish to save as a web template.  Upon doing so, you receive an error.

Issue:

Error exporting the list named “Announcements” at the URL: Lists/Announcements

If you rename the list and try to save as a template again it will just give the same error with a different list, in alphabetical order.  When you look at the correlation ID you see:

SPSolutionExporter: System.NullReferenceException: Object reference not set to
an instance of an object.
at Microsoft.SharePoint.SPContentType.Serialize...

This is the one of the first lines in the log for your correlation ID.  When you look at the content types for your subsite, you see some of your custom content types but none of the defaults.  When looking at the root web for the site collection you see the same.

Resolution:

Run the SharePoint 2010 Management Shell as Administrator.  Run the following command to disable the default content type feature:

Disable-SPFeature –Identity ctypes –url http://SiteCollection

Then enable the content type feature:

Enable-SPFeature –Identity ctypes –url http://SiteCollection

If you look at your content types, they should now all be there.  Try saving the subsite as a template again, it should succeed.

5 Responses to “Save Site as Template: Error exporting the list named “Announcements” at the URL: Lists/Announcements”

  1. Ahmed says:

    Thanks , Jonathan you saved my life !!! it works perfectly

  2. petka says:

    Thank you, saved my butt.

  3. Des Owen says:

    Hi Jonathan

    I have seen this problem several times and I’m wondering if you know what causes it to happen in the first place. My client does not allow easy access to PowerShell so it can take a week to get the script run that fixes the problem but why would the content types disappear in the first place? I’m wondering if it’s related to the removal from the galery of the saved template used to create the site collection.

    Des Owen

  4. Ricardo says:

    Hello Jonathan

    I followed the steps you said but the problem remains.
    Also when I executed the Enable-SPfeature command iI had to add the force param otherwise I had an eror message “Content type with 0x Identifier defined at feature {xxxx}” was found at the current site collection …”

    ¿Any other ideas?

    Many thanks

  5. Hans Leonhardt says:

    thanks a LOOOOOTTT .. great…

Leave a Reply

About Me

Twitter

    Photos

    Activate the Flickrss plugin to see the image thumbnails!