Skip to content

Don’t mess with SharePoint’s Site Property

It’s been a while since I’ve stumbled across a defect in SharePoint so I was about due. (I’m not saying that it’s a buggy product — I’m saying that you do what I do you just get used to finding defects.) This one was interesting. SharePoint has what are called dynamic scopes (‘This Site’ and ‘This List’) and for this particular client they didn’t work. They never returned results. You could search with a different scopes and you would find the content so I knew it was being crawled correctly. However, when I would search with one of the dynamic scopes, no dice. What made it more fun is that it was only one of the two SSPs on the farm that had the problem — so we knew it wasn’t corrupt binaries.

Help Your SharePoint User

After a ton of research and some good work by escalation engineering we realized that the ‘Site’ managed property in the SSP had been deleted and recreated. Oops. That’s bad. Somewhere SharePoint relies on that not happening (generally because they refer to the property via a well known ID number instead of its name.) The issue has been reported but it’s not going to get fixed. The net result is that we get to recreate the SSP. That wouldn’t be so bad except that this customer has targeted content. So? Well, audiences may have friendly names but what’s stored in the pages and web parts for targeting is the GUID of the audience — and when you create an audience, you can’t specify the GUID — even through the API. Gary Lapointe has some STSADM command extensions that will allow you to import and export audiences. That’s a good start but that still means coming up with some code to enumerate all of the pages and all of the web parts on the pages looking for targeting — and changing GUIDs if they are. The good news is that the field isn’t really protected so you can do the replacement pretty easily. The bad news is that no one has created a tool to walk all of the targeting in a web (or farm) and make those GUID changes. (It would be quite useful.) We’ll probably manually repair the targeting because it will take us longer to build and test a tool than to do it by hand…

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share this: