Thursday 15 July 2010

Adventures in SharePoint variations

I'm currently dealing with a MOSS 2007 site using variations.

They have 29 variations currently running and are adding new variations at a rate of 3 or 4 a year

Recently on publishing a page to the root site they found the page didn't get published to all the variations. Uh oh.

This isn't going to be a great day.

The workflow that runs to publish the page showed the message "error occurred". I spent some time investigating the logs around the workflow but this didn't really get me anywhere. I checked on disk space and the usual suspects anything that might stop workflows and normal processes running correctly - as they had been upto this point.

Nothing

So i switched the logs to verbose and published a test page from the root site to see if i could track the messaging in the trace log to see what was happening ( i used SharePoint ULS log viewer to track the relevant messages) .

Sure enough SharePoint was happily publishing the said page to a number of variations but then failed and stopped when it reached a variation it couldn't propagate to.

The error was "Cannot create Variation Publishing Page because the target Publishing Web cannot be determined"

Strange because the particular site was seemingly available within "Manage Content and Structure"

But this lead me to a chilling and dark conclusion.

To understand the chill i experienced you need to understand how SharePoint propagates pages from the root site to the different variation sites.

SharePoint maintains a list of relationships between pages in the root site and pages in each variation. This information is stored in an hidden list called not surprisingly "relationships list".

This list has some several thousand items in it. Lots of Guid's and object id's enough to make your vision go blurry trying to read them.

When i checked the relationship list for the variation country that had failed i was immediately suspicious as there were only a few links assigned to that country variation whereby most of the current variations clearly had a link seemingly for every page in the site.

This was telling me i had problems with relationships. (Something my friends have been telling me for years)

I investigated this by installing a tool widely used (as there aren't any others). The SharePoint Variations Editor. This however didn't work for me, most disappointingly it correctly found my site but threw an error when trying to enumerate the sites. I didn't spend too much time working out why as it was a long hopeful shot anyway.

So having now spent the best part of the day investigating the problem i turned to Gary LaPointes  stsadm extensions for fixing variations.

http://stsadm.blogspot.com/2008/04/fix-variation-relationships-list.html

I installed the solution ran the command. But again failure.

I got the message "Value out of range" or similar. I knew what was coming.

At this point i'd checked the version of MOSS and found this to be only running SharePoint SP1.

Some googling later i found plenty of evidence that SP2 contained a number of improvements as well as some stsadm commands to help fix problems with variations and the relationships list.

http://support.microsoft.com/kb/953334

So not sure if this was good news or not but at least if i get the latest SP2 and cumulatives installed i can get help from MS.

So Installing SP2 it is. I hope it works! Stay tuned for Part 2 where i will hopefully be cheerily informing you how i fixed my relationship troubles or alternatively how i will be crying into my tea at taking down a client server for a couple of hours for no apparent reason.

2 comments:

Tim Dobrinski said...

Dave,

My name is Tim Dobrinski. I wrote the Variations Editor. I happened across your post and was curious to the errors you are getting the the app. I can do waht I can to see if there is a way to get your site variations back up and running.

Tim

Dave said...

Hi Tim, thanks for your offer to help, i was getting an error saying "unable to build site tree for" after the tool scanned all the labels.

Is there anyway to find out why it was unable to?