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.

 

Comments (14)
  1. zzz says:

    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 🙂

  2. Bil Simser says:

    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).

  3. Ignatius says:

    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.

  4. Daniel McPherson says:

    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.

  5. Daniel McPherson says:

    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.

  6. Daniel McPherson says:

    Hey zzz, Feel free to comment. You do raise an interesting point, and one that I unfortunately do not have an interesting answer to!

  7. Ignatius says:

    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.

  8. Leland Cheung says:

    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?

  9. Daniel McPherson says:

    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.

  10. Christophe says:

    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

  11. Christophe says:

    I sometimes have to search before post :-))

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

    😉

  12. appel says:

    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.

Comments are closed.

Skip to main content