Technology Toolbox

Your technology Sherpa for the Microsoft platform

Jeremy Jameson - Founder and Principal



Always Include "Path" In Search Core Results Web Part

This post originally appeared on my MSDN blog:

Since I no longer work for Microsoft, I have copied it here in case that blog ever goes away.

Here is a bug in Microsoft Office SharePoint Server (MOSS) 2007 that I've stumbled across at least twice in the last couple of years...I'm hoping that if I take the time to blog about it, I won't forget it again.

If you don't include Path in the SelectColumns property of the Search Core Results Web Part, then you will find that when you click one of the items in the search results, nothing happens. In other words, the href attribute of the anchor element is not set.

If you look at the default XSLT stylesheet for the Core Results Web Part, you won't find any mention of "path" -- however, that apparently doesn't mean that it is safe to remove from the list of selected columns.

If you don't include Path, then the url element in the search results XML is not populated and consequently the search result links are rendered useless.

...and that's no April Fools joke!


No comments posted yet.

Add Comment

Optional, but recommended (especially if you have a Gravatar). Note that your email address will not appear with your comment.
If URL is specified, it will be included as a link with your name.

To prevent spam from being submitted, please select the following fruit: Strawberry

Please add 8 and 6 and type the answer here: