tags:

views:

222

answers:

2

While setting up a test environment I was attempting to set up many different types of sites for testing various things when I ran into a strange bug in SharePoint.

I was creating a subsite under a blank site template and saw the option for "News Site" so I selected it and got an error saying that the Publishing Feature was not enabled at the site collection level.

Fine. So, I went and activated it and then attempted to create the site again and I got the error:

The Web site address "/mpsite/news" is already in use

Ok, so the site must have been created anyway so I try to visit the URL and get:

The webpage cannot be found

Fine. So, obviously it errored in the middle of the site creation so I'll just delete it via STSADM. Wrong:

There is no top-level Web site named "http://server/mpsite/news/".

So, the site is listed in the sites and workspaces list, but doesn't really exist and can't actually be deleted.

How do I get rid of it from the Sites and Workspaces listing?

+1  A: 

Have you tried http://server/mpsite/news/_layouts/deleteweb.aspx ?

Or maybe the "Content and structure" (http://server/mpsite/_layouts/sitemanager.aspx) link from site actions?

JMD
Cool, going directly to the deleteweb.aspx worked ... never would have guessed, good advice.
webwires
+3  A: 

You've run into one of the lovely undocumented "features" of SharePoint - site templates get applied after the site gets created in a seperate, descrete step. This means that potentially, a site can "exist" (as far as the content database is concerned) without template, which leaves you with a site you can't browse to, but still sorta "exists" in SharePoint purgatory (I've actually written a couple of hacks that involve relying on this "feature").

It looks to me like you may have run into one such situation - when you went to go create your site, I'm guessing that you got the error before the template was applied to your news site.

The way I've fixed similar problems in the past has been to use SharePoint Designer to delete the sites - since it looks straight into the content database for what does and doesn't exist, it might do the trick for deleting your rouge news site.

Hope this helps!

Adam McKee