SharePoint Stuff

A collection of helpful tips and resources on maximising the value from a SharePoint Portal Server and Windows SharePoint Services Implementation.

Tuesday, October 17, 2006

Link to Advanced Search

To create a link that leads directly to SharePoint Advanced Search use the following


Monday, August 28, 2006

Global Design Banner Change to SPS

I have been trying to implement a global design banner change to my SPS site and after fiddling around for a long long long time I finally got it all working. If anyone ever needs to go down that path.
1. Follow the steps in "Applying a Custom Banner". The following is the various folders that exist in Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033 where you need to update the default.aspx and which sections they control.
SPS Home
SPSBWEB To create bucket Web sites
SPSCOMMU Communities
SPSMSITE Site Registry
SPSNEWS Subareas under News
SPSTOC Topics Home

Contrary to the MS article all these changes update are the Area Home Pages, Site Summary Page and Search Pages.

2. The content pages still have the default template and you need to manually update each of the following files
editform.aspx and

for each of the following content areas

for each of the relevant areas in 1. Meaning if you want to update the Document Library pages within any section that uses the Home Template you need to update the 4 aspx files in \1033\SPS\LISTS\DOCLIB. Similarly if you want to update the Survey pages in a section that uses the News Template you need to update the 4 aspx files in \1033\SPSNEWS\LISTS\VOTING. etc etc etc

3. To update all the admin pages you need to update PortalHeader.aspx in \Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033. Make sure you keep all the SPSWC line and then add your design changes following it.

What I also did find out is that in theory all SPS sites are built off ONET.XML contained in the relevant /SPS??/XML folder. However you need to make the changes to the ONET.XML file BEFORE creating the Portal Site. However if you update the ONET.XML file then SPS doesn't create the portal site and returns an error.

Also most of the admin pages have the following tag

string alternateHeader = SPControl.GetContextWeb(Context).AlternateHeader;
if (alternateHeader == null alternateHeader == ""){

which is why any changes made to PortalHeader.aspx in 3. above affects all admin pages. An idea would be to include this tag in all the user aspx pages so while you still need to initially update all pages manually, all subsequent changes only need to be made to one file.

Finally, if you update any page on SPS using Frontpage 2003 you can then no longer update it directly via the file system. For example if I update the SPS home page using Front Page, then any subsequent changes I make to \1033\SPS\default.aspx will no longer be valid and won't feed through to the user.

Friday, August 18, 2006

How To Create a New Site Definition

To create a new WSS Site Definition
1. Make a copy of STS folder in “Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033” and give it a unique name (say MYWSS). Make sure that the folder name is all in capitals.

2. Create a new XML file called WEBTEMPMYWSS.XML (all capitals) in the Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\XML folder. The file name MUST be WEBTEMP followed by whatever you have called the folder.

3. Add the following lines to the xml file

< ows="Microsoft SharePoint">
< id="10001" name="MYWSS">
< configuration id="0"
title="My New WSS Site Definition"
description="Use this template for creating all WSS sites on this portal.">
< /configuration>
< /template>
< /templates>

a. Template Name must be the same as the folder name – and in all capitals
b. ID must be unique commencing from 10000
c. Configuration Title is the title you wish to display in the template pick list box.
d. ImageURL if you have a custom image you wish you display in the template pick page when users select MYWSS – or you can just use the default.
e. Description is displayed when the user clicks on MYWSS in the template pick page.

6. Restart IIS

MYWSS should appear in the Template Pick page when creating a new site. If you ever wish to remove the site definition, and WSS sites exist that are based on it change the “Hidden” attribute to “TRUE” in the XML file above. Under no circumstance should you delete the MYWSS folder or WEBTEMPWSS.XML files.

Wednesday, August 09, 2006

Can't rename if you can't delete

The ability to delete items in SharePoint is managed via the permission "Delete items from a list, documents from a document library, and Web discussion comments in documents". However if you revoke this permission, the user is no longer able to rename documents either. They can change all other properties but cannot rename.

I have since then reviewed the SharePoint Object Model in more detail and according to the SPFileCollection Class (, SharePoint only has 2 document management options - add and delete. Hence the rename of the file is effected by SharePoint as creating a copy of the file with the new filename and then deleting the old file.

So if the user can't delete - they can't rename. Unfortunately there is no workaround since the permissions don't go any more granular than this.

Friday, July 28, 2006

Office 2003 documents Open in Read-Only Mode

If you click on an Office document in SharePoint to open it - it loads it in the relevant application, but in Read-Only mode. The way to open a document to edit - is to access the context menu and select "Edit in Microsoft Office Word [or like]". This is especially annoying when searching for documents, since the search results does not show the context menu and does not provide a link to the document library containing the document. So the only option is to load the document in Read Only mode but then to save it - the user needs to know which document library it belongs to and then manually navigate to it.

There is however a workaround as detailed in It involves adding a new registry key on every desktop as follows
1. Quit all Office 2003 programs that are running.
2. Click Start, click Run, type regedit in the Open box, and then click OK.
3. Locate and then right-click the following registry subkey: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Internet
4. Point to New, and then click DWORD Value.
5. Type OpenDocumentsReadWriteWhileBrowsing, and then press ENTER.
6. Right-click OpenDocumentsReadWriteWhileBrowsing, and then click Modify.
7. In the Value data box, type 1, and then click OK.
8. On the File menu, click Exit to quit Registry Editor.

Tuesday, July 18, 2006

Not all WebParts appear for all users

Apparantly "Users who are members of custom site groups cannot access Web Parts when they view Web Part galleries in SharePoint Portal Server 2003". This is because the webpart gallery is nothing but a custom list - however it is not set to automatically inherit permissions - so none of the custom site groups can access any of the standard webparts in the web part gallery.

To work around the problem, add the custom site groups to the Web Part gallery. Then, assign permissions to the custom site groups. To do this, follow these steps: 1. Connect to the portal site, and then click Site Settings.
2. Under General Settings on the Site Settings page, click Manage security and additional settings.
3. Under Templates and Web Parts on the Manage security and additional settings page, click Manage Web Part gallery.
4. On the Web Part Gallery page, click Modify settings and columns.
5. The Customize Web Part Gallery page is displayed in your Web browser. The URL in the Address box of the Web browser contains a GUID in brackets. Copy the GUID that appears in the URL, and then paste the GUID into a blank document in Notepad.

The following is an example of a URL:
In this example URL, the GUID is AE2A9E4C-BE4C-47C6-8A01-45E119543F7F.
6. In a new Web browser window, type the following URL in the Address box, where GUID is the GUID that you determined earlier in step 5:
Note Make sure that you replace the GUID that you determined in step 5 with the GUID in the URL. To do this, paste the GUID from the Notepad document into the URL.

The following is an example of a URL that uses the example GUID from step 5:
7. After you type the URL and the GUID in the Address box of your Web browser, press ENTER. The Change Permissions: Web Part Gallery page is displayed in your Web browser.
8. On the Change Permissions: Web Part Gallery page, click Inherit permissions from the parent Web site.
9. Click OK on the message that appears.
10. Assign the View items permission to all site groups except for the Web Designer site group. To do this, follow these steps:a. On the Change Permissions: Web Part Gallery page, click to select the check boxes that are next to the site groups that are displayed on the Change Permissions: Web Part Gallery page. Do not click to select the check box that is next to the Web Designer site group.

Note Make sure that the check box that is next to the Web Designer site group is not selected.
b. Click Edit Permissions of Selected Users.
c. On the Modify Permissions: Web Part Gallery page, click View Items, and then click OK.

11. Assign the View, insert, edit, delete items; change list settings permission to the Web Designer site group. To do this, follow these steps:a. On the Change Permissions: Web Part Gallery page, click to select the check box that is next to the Web Designer site group, and then click Edit Permissions of Selected Users.
b. On the Modify Permissions: Web Part Gallery page, click View, insert, edit, delete items; change list settings, and then click OK.

Monday, July 17, 2006

HTTP Error 401.2 - Unauthorized: Access is denied due to server.

This error occurs when "Integrated Authentication" has not been enabled on the website. This is usually the case with the Default Web Site since that is created when IIS is first installed and SharePoint doesn't update the security settings.

Tuesday, July 11, 2006

< !-- #RENDER FAILED -- > Error Message

The "<!-- #RENDER FAILED -->" error message sometimes appears in WebParts where
1. You are sorting by Modified Date
2. and you "Display items in batches of the specified size."

To fix the error, either change the default sort order, or change the "Item Limit" option in the view to "Limit the total number of items returned to the specified amount."

Tuesday, June 27, 2006

Error ID 7055 using SPSBACKUP

Using SPSBACKUP from the command line may sometimes cause the following error to be logged on the Database Server

3041 :BACKUP failed to complete the command BACKUP DATABASE [dbname] TO DISK = N'filepath' WITH INIT , NOUNLOAD , NOSKIP , STATS = 5, NOFORMAT

This error can be returned for the following reasons
1. Not using a UNC File Path.
2. The Database Account not having write permissions to the location where the file is being saved.

Tuesday, May 30, 2006

People Search returns public.aspx in Results

If the "Include this property" check box is not selected for "PreferredName" in "Site Settings" > "Manage Properties of Crawled Content" > "urn:schemas-microsoft-com:sharepoint:portal:profile", then the search results will display "Public.aspx" instead of the users display name in all SharePoint Search Results.

The issue is not resolved even if you go back and select the "Include this property" checkbox. This is because the "Mapping to this property" option is disabled, and it need to have "Title" checked.

This a known bug and to resolve it get the relevant Hotfix
1. KB 911576 for SharePoint Portal Server SP2
2. KB 911559 for SharePoint Portal Server SP1

Once the hotfix has been installed, select the "Include this property" checkbox for "PreferredName". You will note that the "Mapping to this property" is still disabled but the "Title" radio button is selected. To double check, go to "" and it should have a link to "Preferred Name" in the "Mapping to this property" section.

Do a full update of the indexes and you should be right.