19 November, 2013

Unable to save site as template + unexpected error has occurred

Here we go, it’s been a long time I didn’t publish an article which consist of hardcore troubleshooting! Yes, you are correct. It took some time to resolve but finally the issue has been resolved. This time it’s regarding problem occurring while ‘save site as template’ and how we found the culprit.

Problem description:-
User has raised the problem ticket by mentioning “facing problem while saving the site as template”, additionally the templates are getting saved in the solution gallery but not able to activate it also.

Error message:-
An unexpected error has occurred.

Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: acd95f50-4049-4625-9682-aa93aded118f

Troubleshooting done:-
Further debugging in the SP ULS logs and we found some strange facts which are based on event receivers- please refer below-

SPSolutionExporter: Microsoft.SharePoint.SPException: Feature definition with Id 77658379-50ff-4e1e-a431-5652bee07a87 failed validation

Looking for 'ReceiverAssembly' attribute in manifest root node for solution

Looking for 'ReceiverClass' attribute in manifest root node for solution

The 'Format' attribute is invalid - The value 'CheckBoxes' is invalid according to its datatype

I debug further to find out where the problem is-

I downloaded the saved wsp's from  /_catalogs/solutions/Forms/AllItems.aspx to my desktop

Renamed it to .cab

Extracted all the contents and found some interesting facts along with manifest.xml file like-

1.      List Instances
2.      Modules
3.      Property bags
4.      web template

Inside List Instances, I found ElementsFields.xml

Once i opened the above xml file, search for the checkboxes and found the following-

Further exploration on this, it seems that the checkbox attribute is invalid and needs to be modified.

Resolution:-
After this one, the solution is pretty much simple, just go ahead and remove that affected column / remove the affected content type – does not require IISRESET also.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issue, Thank you.

24 comments:

  1. nice troubleshooting Amol.

    ReplyDelete
  2. Hi there,

    I think I've come across the same issue sometime ago and this might be related to you have a calculated column somewhere in your site. Try looking for this column...copy the formula and keep somewhere then try saving site without the formula in that calculated column. Make sure you are testing in DEV first!

    ReplyDelete
  3. I agree with above comment, I have had the same issue when I tried saving the site as a template. If I am working with a site with multiple sub sites I will save all the scripts and calculated columns from the main site and it's subs then remove them and save the sites as a template if I am going to reuse them.

    ReplyDelete
    Replies
    1. Excellent, this will definitely useful for the whole SP communities...

      Delete
  4. Another thing to check -- if you have the SharePoint Server Publishing feature enabled on a site, you have to disable it before you can save the site as a template.

    ReplyDelete
  5. I faced similar issue and this microsoft KB was a life-saver!
    http://support.microsoft.com/kb/2492356

    ReplyDelete
    Replies
    1. wow, thats awesome. Thanks for sharing!

      Delete
  6. Checking the ULS logs to get the error based on corelation ID.
    The cause might be some lookup columns of if you have symbols in column/List/Custom Task form name.

    ReplyDelete
  7. this error is Couse the publishing feature is deactivated in the is u saved as a template

    try to save the site form the URL

    navigate to the site u r tiring to save and past "/_layouts/savetmpl.aspx"

    it will work

    -ahmad alhorani

    ReplyDelete
  8. Hi Amol - I've similar issue, I enclosed error,please let me know if you have any solution for this issue - Thank you.

    Correlation ID: 24c6a724-3619-470f-968f-8a86282551fe
    Error exporting the list named "tasks" at the url: list/tasks

    I re-enabled default content database using following command but no luck :(
    Disable-SPFeature –Identity ctypes –url http://xxxxxx

    Then enable the content type feature:

    Enable-SPFeature –Identity ctypes –url http://xxxxxx.com/sites/

    I appriciate if you provide some solutions

    Thank you.

    - Rao

    ReplyDelete
    Replies
    1. Could you please share the ULS findings here? Additionally support if you do the export and import operations for the site that you wanted to move then what happens? - Did you already check this?

      Delete
    2. This comment has been removed by the author.

      Delete
    3. I exported sites without any issues.

      Delete
    4. Try renaming the task list and then check the results. - This has to work! keep me posted.

      Delete
  9. Hi Amol - There is no task list it is blank site, even though it is not saving as a template...

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Error
    Error exporting the content type named "Collect Feedback Workflow Task (en-US)".

    Troubleshoot issues with Microsoft SharePoint Foundation.

    Correlation ID: d8929203-86d7-4af2-bc7b-77743e41d30f

    Date and Time: 5/6/2014 8:19:36 PM

    ReplyDelete
  12. Nice article :)

    Now come to interesting point, what will happen if that site column is attached in multiple content types and all content types are attached into multiple document libraries. In that case you think that you should not delete that site column.

    Actually that is my same case so what I did just go to edit column page and change Display choices using: from Checkboxes (allow multiple selections) to drop down or radio buttons.

    After that your save site as template will be successful. Than after restore this site you can change that site column again into Checkboxes (allow multiple selections). And if you have multiple site collections like that off course you can use PS script :)

    ReplyDelete
  13. Devops is not a Tool.Devops Is a Practice, Methodology, Culture or process used in an Organization or Company for fast collaboration, integration and communication between Development and Operational Teams. In order to increase, automate the speed of productivity and delivery with reliability.
    python training in bangalore
    aws training in bangalore
    artificial intelligence training in bangalore
    data science training in bangalore
    machine learning training in bangalore
    hadoop training in bangalore
    devops training in bangalore

    ReplyDelete

Your feedback is always appreciated. I will try to reply to your queries as soon as possible- Amol Ghuge

Note: Only a member of this blog may post a comment.