Installation Instructions

Aug 13, 2009 at 10:13 PM

I wanted to thank Josh Carlisle and anyone else related to development of the SharePoint Smart 404 Feature.  We are amid a migration from Portal 2003 to MOSS 2007.  SharePoint Portal 2003 supports area pages.  MOSS….. does not.   Due to things like that our migration includes some reorganization and restructuring as we converted area pages to sites, collapsed sites down, etc.

This feature is a better than expected solution for dealing with the broken links caused by reorganization and restructures of your site.

I do have to admit, as a server admin supporting some developers…. my knowledge of SharePoint development was lacking.  Trying to get this running was like pounding a square peg into a round hole without some instructions.  Since I did not find any, I have created the ones below.  Feel free to use, comment, or correct (recognizing that I am not a SharePoint expert :-)

Installation is pretty easy.  I did have some issues where installation and activation through the web interface did not work, so I did a command line install.  Still, that part is pretty easy.  The feature is installed, activated and ready to go.  As you stare at the command prompt, you notice…  …nothing.  Nothing is different.  On a large site… you look through menus and see no noticeable changes.  How do you know it is even working?  How do you use it or modify it?

 This will hopefully help you understand what has been installed and how to really leverage it.

 I have tested the feature install in the following environments:

 

Windows 2003 Standard R2 x32 (1 all in one FE / Search Server)

WSS 3.0

SQL Server 2005 Express

(all fully patched as of AUG 09)

 

Windows 2003 Standard R2 x64 (1 all in one FE / Search Server)

MOSS 2007 (SP2 + language packs)

SQL Server 2005 Standard (separate cluster)

(all fully patched as of AUG 09)

 

Windows 2003 Standard R2 x64 (2 FE servers, 1 Search Server)

MOSS 2007 (SP2 + language packs)

SQL Server 2005 Standard (separate cluster)

(all fully patched as of AUG 09)

 

The SharePoint Smart 404 feature set is a collection of SharePoint lists, pages and a web part.  The lists are where customizations are made.  The pages and web part execute the “magic”.

 

To install the feature:

 

ADDING THE SOLUTION

  • Copy the WSP file to one of the front end web servers.
    EXAMPLE:
    C:\TEMP

  • Open a command prompt to the BIN directory for the STSADM.EXE command file.
    EXAMPLE:
    CD C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

  • Execute the STSADM command to add or import the solution into WSS / MOSS.
    stsadm -o addsolution -filename {WSPFILENAME}
    EXAMPLE:
    stsadm -o addsolution -filename c:\temp\SharePointSmart404.wsp


INSTALL THE FEATURE

  • Execute the STSADM command to install the solution into WSS / MOSS.
    stsadm -o installfeature -filename {WSPFILENAME}\feature.xml
    EXAMPLE:
    stsadm -o installfeature -filename SharePointSmart404\feature.xml

ACTIVATE THE FEATURE

  • Execute the STSADM command to install the solution into WSS / MOSS.
    stsadm -o activatefeature -filename {WSPFILENAME}\feature.xml – url {FULL URL OF YOUR WEBSITE} -force
    EXAMPLE:
    stsadm -o activatefeature -filename SharePointSmart404\feature.xml -url http://www.sharepointbrainfreeze.com –force

 

 INSTALLATION VERIFICATION

 

To verify the installation, connect to your site as a site administrator.

EXAMPLE:
http://www.sharepointbrainfreeze.com/sharepoint

Go to the SITE ACTIONS --> SITE SETTINGS

Under Galleries, select Web Parts.  You will see the Smart404SearchPart.webpart installed.  Unlike other web parts, you cannot click on the Smart404SearchPart.webpart for a display of what it does. A developer informed me that web parts must be programmed with a kind of display or advertisement feature. It serves no functional value and hence has not been completed for this beta release.

Next, go back to SITE ACTIONS --> SITE SETTINGS --> SITE ADMINISTRATION --> SITE LIBRARIES AND LISTS

Verify that the lists ExceptionLogs, Utility and VanityRedirects exist.

 

 Test the installation of the feature by going to your web site URL and then appending a path that you know does not exist.
EXAMPLE:
http://www.sharepointbrainfreeze.com/sharepoint

 

If the feature is properly installed, you will get a customized 404 page that has inherited your site look and feel.  Additionally the page will have executed a search for the items relevant to the path you input.  In this case, it would have searched on “sharepoint” and returned appropriate search values.

 

If you get a message that says “an indexer was not assigned” then you need to go back to the server and connect to the Central Administration console.

 

Go to APPLICATION MANAGEMENT --> SHAREPOINT WEB APPLICATION MANAGEMENT --> CONTENT DATABASES

 

Verify you are on the correct web application and select the content database for that web application.

 

In the content database, Select the Search Server from the pull down and select OK.

 

 

CONFIGURATION

 

Vanity Redirects are likely the only customization you will ever need.  Connect to http://{YOURWEBSITEURL}/Lists/VanityRedirects/AllItems.aspx

 

If the path does not work, verify the path listed under the Customize List link when viewing your SITE LIBRARIES AND LISTS. 

 

To create a new Vanity Redirect, simply create a new entry.  If you have a lot of Vanity Redirects to enter, just create a new data sheet view and then list / order your columns accordingly. 

 

I manipulated our dozens of redirects within Excel and then pasted them in when ready. 

 

Items to note:

 

The paths are not required to be absolute, but think through how a user bookmarked a page.

 

EXAMPLE:
On the old site, a the link was http://www.sharepointbrainfreeze.com/HumanResources/Default.aspx and you are moving the content to a new folder called http://www.sharepointbrainfreeze.com/HR

 

You will want to put in a redirect for

 

http://www.sharepointbrainfreeze.com/HumanResources/Default.aspx to http://www.sharepointbrainfreeze.com/HR

 

and an entry for http://www.sharepointbrainfreeze.com/HumanResources to http://www.sharepointbrainfreeze.com/HR

 

If you do not put one in for Default.aspx and the user has a bookmark to that exact path, the 404 PAGE may be invoked and give you a search value of all sites with DEFAULT.ASPX.  The feature is excellent but it will only return what you ask for.  Be careful what you ask J. 

 

Additionally, be aware of spaces. 

 

EXAMPLE:
On the old site, a the link was http://www.sharepointbrainfreeze.com/Human Resources/Default.aspx and you are moving the content to a new folder called http://www.sharepointbrainfreeze.com/HR

 

You will want to put in a redirect for

 

http://www.sharepointbrainfreeze.com/Human%20Resources/Default.aspx to http://www.sharepointbrainfreeze.com/HR

 

and an entry for http://www.sharepointbrainfreeze.com/Human%20Resources to http://www.sharepointbrainfreeze.com/HR

 

If you do not put in the %20 value for the space, then the web part ends its evaluation of the string at the space.  The drawback there is that   http://www.sharepointbrainfreeze.com/Human Resources/Default.aspx  is actually evaluated as http://www.sharepointbrainfreeze.com/Human.  Since those do not match…. You get kicked to the search engine for the next relevant matches.

 

 

 

Nov 3, 2009 at 8:56 PM

I am trying to follow these instructions, but something seems to be missing. The first step of installing the solution is working fine. It is when I get to the next step (installing the feature) that I get an error.

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsadm.exe -o installfeature -filename SharePointSmart404\feature.xml

Failed to find the XML file at location '12\Template\Features\SharePointSmart404\feature.xml'

I am guessing somewhere I missed a step of copying things...

Any ideas?

Dec 14, 2009 at 10:19 PM
gislio wrote:

I am trying to follow these instructions, but something seems to be missing. The first step of installing the solution is working fine. It is when I get to the next step (installing the feature) that I get an error.

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN>stsadm.exe -o installfeature -filename SharePointSmart404\feature.xml

Failed to find the XML file at location '12\Template\Features\SharePointSmart404\feature.xml'

I am guessing somewhere I missed a step of copying things...

Any ideas?

I've installed this feature thanks to this helpful installation instructions.  However, like gislio stated, it is missing a step.  For those following this, here it is:

After installating the solution, you must deploy it. You may also need to enter other attributes depending on your configuration.

Deploy the solution
stsadm -o deploysolution -name {WSPFILENAME} -url {SITEURL}