Welcome to MSDN Blogs Sign in | Join | Help

Help! I have deleted the Topics Area! (or any of the standard areas)

This has come up a number of times, both internally and with customers I have worked with, so what do you do when you have deleted one of the standard SharePoint Areas?

The first thing to say is that it is not a really a good idea. Instead of deleting one of these areas (News, Topics, Sites) I would instead hide it and then lock down security so that only an Admin can access it. This essentially deletes it for all users anyway. The reason I would recommend this approach, rather than deletion, is mainly because these are "special" areas. While you may be able to get them back functionally, you can't ever TRULY get them back.

To give you a couple of examples:

1. The Topics area is special because this is what drives the left hand navigation on the home page. If you delete the Topics area then you will notice that this control will instead display all the top level areas (the same ones as are appearing on the horizontal navigation bar across the top). This SPS control is driven off the Topic Area's "Category ID", these are automatically generated by SharePoint and unique, so even if you create a new area and name it "Topics" the navigation on your home page will not magically start "working" again (this also explain why if you rename the Topics area this functionality continues to work!).

I know what you are thinking. If I HAVE deleted the Topics area, or I have hidden the Topics area, how do I control what areas are displayed as navigation on the home page of my Portal. Well you can set this control to instead be driven off any area on the portal. To do this follow the following instructions:

a) Open <drive>:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\<Locale ID>\SPS\default.aspx
b) Search for the following string: <SPSWC:CategoryNavigationWebPart runat="server" id="VerticalNavBar" DisplayStyle="VerticalOneLayer" />
c) Replace it with the following string: <SPSWC:CategoryNavigationWebPart runat="server" id="NewVerticalNavBar" DisplayStyle="VerticalOneLayer" CurrentCategoryID="<INSERT CAT ID HERE>"/>
d) Where <INSERT CAT ID HERE> is equal to the Category ID of the area whose children you wish to display as navigation. To get the Cat ID: Browse to an area, then click on "Change Settings" and copy the string that appears after "CatID=" in the URL.

2. One thing that is harder to fix, and really highlights why you should not delete these areas, is that there are a number of features in the SharePoint object model that allow you to quickly and easily access the system areas programmatically. I suspect that these calls are going to be used by custom web parts and third party SharePoint add-ins. I also suspect that once you have deleted a system area there is no way to reconnect the object model features.

 

Published Friday, May 28, 2004 5:21 PM by danielmcpherson

Comments

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Friday, May 28, 2004 6:15 PM by zzz
I've never used SharePoint, but obvious question here is why those "special" areas even can be deleted (easily?), wouldn't it make more sense to override the default delete for special areas to just hide them or hide the delete functionality. Or maybe I should not comment when I have no clue anyway :)

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Monday, May 31, 2004 6:25 AM by Bil Simser
Actually one thing that I steer people towards is re-creating the Sites directory. You can do this quite easily by:
1. Edit the Home page so that it allows creating sub-areas using any template (this is turned off by default)
2. Create a new sub-area from the Home page called Sites using the Site Directory template

Voila! I've compared the out-of-the-box Site directory and a created one and they're identical (except for the GUID in the database, but that's to be expected).

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Monday, May 31, 2004 8:34 AM by Ignatius
There is one way to use get the "Topics" area again. You will have to directly access the database and modify a value. Here are the details.
First create the "Topics" area again in the SharePoint website.

Then Goto :-
Database: (SPSITENAME)_SITE
Table: CatPredefined.

Row:
Key = 2, Value = (Topics Area Guid).

Restart IIS.

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Monday, May 31, 2004 10:23 PM by Daniel McPherson
Hey Bil,

You are absolutely right, functionally this will "recover" your sites directory, however again OM calls to return the "Site Directory" will fail. It is possible that some Third Party tools will rely on this functioanlity. So it is not a complete recovery.

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Monday, May 31, 2004 10:25 PM by Daniel McPherson
Hi Ignatius, while your instuctions may work I would have to urge caution. Making changes directly to the database cannot be supported by Microsoft. There is just no way of being sure that you are updating everything SharePoint needs to have updated in order to function correctly.

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Monday, May 31, 2004 10:26 PM by Daniel McPherson
Hey zzz, Feel free to comment. You do raise an interesting point, and one that I unfortunately do not have an interesting answer to!

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Tuesday, June 01, 2004 9:00 AM by Ignatius
By doing what I suggested before will cause some serious side effects, such as not being able to index, search properly, etc. The way to truly fix the deleted Topics area is to drop the Portal sites and rebuild them which is worthwhile only if you got nothing in them.

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Thursday, July 08, 2004 4:30 PM by Leland Cheung
I tried your suggestion, but I can see no difference. I set the control exactly as you suggested, but the navigation has not changed. Is the navigation the only thing that "topics" effects out of the box?

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Sunday, July 11, 2004 8:07 PM by Daniel McPherson
Hi Leland, you need to be sure that you follow the instructions exactly. If you don't the navigation will show the areas immediately below the "Home" area.

This does work, I have done it on a number of occasions.

As I said in my article, the deletion of the "out of box" topics area may have an impact on other areas of the product, but more likely with Third Party tools which may make use of the OM call to return the Default Topics area.

# Customize Category navigation bar on the SPS home page

Thursday, July 15, 2004 5:19 AM by Christophe's Blog

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Thursday, July 15, 2004 10:39 AM by Christophe
Leland,

Maybe you just added the CurrentCategoryId and didn't change the ID of the navigation bar. You have to change it, don't know why but I didn't and had the same result as you.

One more question : what about the name of the root area specified in the CurrentCategoryId ? Is it possible to make it appear, as for "Topics" when nothing is specified ?

Christophe

# Customize Category navigation bar on the SPS home page

Thursday, July 15, 2004 5:42 AM by Christophe's Blog

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Thursday, July 15, 2004 10:55 AM by Christophe
I sometimes have to search before post :-))

This is it : adds the ShowTitleForVerticalOneLayer="true" property in the tag.

;-)

# re: Help! I have deleted the Topics Area! (or any of the standard areas)

Wednesday, August 04, 2004 11:34 AM by appel
Hi all,

I've tried the sollution which was given and it works great.

<SPSWC:CategoryNavigationWebPart runat="server" id="NewVerticalNavBar" DisplayStyle="VerticalOneLayer" CurrentCategoryID="<INSERT CAT ID HERE>" ShowTitleForVerticalOneLayer="true"/>

I've deleted the topic section to test what happends and how to get it back. This option is the best I can find. This is also a great option if you want another area to be shown as subitem instead of the Topics.

Thanx for the sollution,

Cheers.
New Comments to this post are disabled
 
Page view tracker