Wednesday, March 9, 2011

SHAREPOINT - Small mistake catastrophic failure: Unable to create TEAM SITE

I was recently faced with a problem that one of my clients encountered.
He wasn't able to create team site, however they were able to create team site.
I asked what changes they have made, but yeah, they have forgotten them.

So I tried myself to reproduce the error by creating a site based on team site definition, and **pooff** I received CATASTROPHIC FAILURE....

The first thing I did, was to look at the sharepoint log, and found:
Unknown SPRequest error occurred. More information: 0x80070002
<nativehr>0x80070002</nativehr><nativestack></nativestack>

Nothing much there...
I pulled my hair as trying to find out the cause, not much luck...
Then one of my colleagues, suggested how about if you create a site using team site definition and save the site as template. Our environment is sharepoint multi-tenancy, so I was able to just create an empty tenant site based on team site (as what the client was using as well), and create a subsite and save that as template.

I then exported the solution and imported that in client's site, and tried to create the site. Then... YAY... I got an error, but this time, it's not Catastrophic Failure, "The list item could not be added or updated because duplicate values were found in one or more fields in the list.".

And I looked at sharepoint log, and found:
Instantiating module "_catalogsmasterpage_global": File could not be added at URL "minimal.master": Error 1318344752 e0aba35c-1920-4d3e-b3eb-e154aecded5a
The list item could not be added or updated because duplicate values were found in one or more fields in the list.<nativehr>0x810200bf</nativehr><nativestack></nativestack> e0aba35c-1920-4d3e-b3eb-e154aecded5a

Mmmm.... It seemed that when creating team site, when adding "minimal.master" to masterpage gallery, it encountered the error. I then looked at a healthy site's masterpage gallery, and found that all those masterpages are having the same title "<asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/>".
Then digging around some more, found that the client has made changes to "Title" field. They made the "Title" field to "ENFORCE UNIQUE VALUE".

Ohhhh Noooooooo... I came to conclusion that this is the root of the problems, and then untick "ENFORCE UNIQUE VALUE" for "Title" field, and voila... I am able to create the team site...

My conclusion is, never mess around with "Title" field because this field is used and you never know what happen... Well, Microsoft didn't test to create team site by letting "Title" to enforce unique value, can't blame them, Sharepoint is a big solution...
So yeah, I told my client about this and suggest them to create a new site column and add it to "Item" content type if they want to that field to appear for every list item they create.

I hope what I encountered is useful to someone who has same problems...

Cheers,
Erick

6 comments: