Variations explained
With variations, you create one or more exact copy/copies of a publishing site (MOSS only). The most common reason to do this is to have your site available in multiple languages. Please see this excelent post on how to set up variations.
MOSS creates all variation labels within the same site collection, and that's where the problems begin.
Variation problems
1) Performance
Risk
When you have a large amount of data in your variation source and let that propagate to the other variation labels, it seems MOSS has a hard time getting the job done. This was reported by Jeremy Jameson in a series of 3 blog posts.
Proposed solutions
- create an index on a non indexed column (see Jeremy's post)
- get some high spec hardware for your database server
2) Content types not propagated
Risk
When you add a content type to a page library in the variation source, this type is not automatically propagated to the other labels (see my previous post). If you then create a page with that content type in the variation source, it does get published to the other labels but loses its content type field values.
Proposed solutions
- Set up your site via a site definition that already contains the proper content type bindings to the page libraries. All labels will use the same content types
- Put a good governance plan in place to make sure manual changes are done in every label
3) Values from localised choice lists don't work over variations
Risk
The scenario we were in was having site columns defined in the root level (so above the variations). These site columns were deployed via a feature and used resource files to have the choice values available in all languages.
This seemed to work fine, but when we actually localised the resource files, we realised that the chosen values in the variation source (Dutch) did not exist in the other labels (English and French). What happens:
SharePoint stores the actual values (not the resource key) in the database, so the English page got (after the variation publishing job copied the Dutch page) the Dutch choice value for gender, "Mannelijk" (= Male). I found out by looking in the AllUserData table in the content database. The English choice list doesn't have that value (only "Male" and "Female") and thus did not select anything. This means that with every time you publish a page in the variation source, you'll have set all localised choice values again.
Proposed solutions
- Build a custom choice control that does not store the value but the resource key
- Instead of creating the choices in a field definition/resource file, create a list in the root (above the variation level) and create a column per language. Build a custom control that reads the correct column based on the language.
4) Publishing a page in the variation source overwrites all values in the other labels
Risk
When you first create a page in the variation, that page will need to get localised in the other variations. When that's done, however, any change in the source will completely overwrite the other label's version and you lose all the translation work. For a major change, that would need to be done anyway, but for a minor, it definately wouldn't.
Proposed solutions
- Have versioning and content approval enabled.
- From the White paper: Plan for building multilingual solutions: add a field to the page content type to indicate the cahnge is minor or major. Then add a custom workflow to the content type libraries to delete the draft version in the target variation label libraries if the change is minor.
5) Not all relations between pages work with variations
Risk
Links in pages to other pages will be detected by the varaiation publishing job and set to the appropriate equivalent in the target variations. In our case, however, we used a sort of lookup on other pages as metadata on a page. Example:
We have a publishing page per author. We also have a publishing page per book. Each book is linked via lookup by content type (one of those nifty controls we created @ e-office) to one or more authors. Under the hood we store the GUID of the author(s) with the book. In a variation setting, however, when the pages are published to the English variation, the English book page still links to the Dutch version of the authors.
Another caviat in our case is that Content Deployment out of the box doesn't keep the same GUIDs. I find this a flaw in the product as the API does provide you with the ability to do retain GUIDs in a staging environment (like a lot of these Internet facing site will use). As the UI doesn't have that option, you're forced to write your own Content Deployment jobs. For more info on this, please see Stefan Goßner's blog post.
Proposed solutions
- Do not store the GUIDs but the page URL. Replace the label part with the current label when publishing the page.
- Use the hidden list http://
/relationships list to look up the
Conclusions
Let me be straight on this: I think the current implementation of variations suck. I think it's fundamentally wrong to put everything in the same site collection; I'd rather see 3 web applications to keep everything separated or a solution in which you have a language swith in edit mode so you work on the multilingual content in the same page. I'd like to see a solution in which you don't have to hassle with your metadata, and do not have to build a ton of custom controls to handle metadata properly. Not being able to see from the target variations what has changed in the source content is also a fundamental omission in a multilingual product. Looking at the amount of effort you have to put in to make your site multilingual, the missing documentation (does nayone know what translatable columns do exactly?), you realise much is still version 1.0.
However, we decided to keep working with variations as we managed to identify the problems and find workarounds. Not using variations would mean we'd have to write our own sort of variation mechanism. Within the boundaries of time and budget, keeping variations is our best bet.
11 comments:
Excellent post, thanks for taking the time to write it. I've also stuck with variations due to time constraints, having said that I certainly won't be using them on subsequent projects (at least until MS can prove that they've made major improvements in service packs!)
Gillian
Credit goes where credits due.
http://blogs.technet.com/stefan_gossner/archive/2007/11/15/some-comments-on-common-variation-problems.aspx
I understand your pain in using Variations but I have to agree with the first reply in that we found workarounds.
We set up the Content Types at the root level, and for choice fields introduced columns for each variation language. Under each site we defined the column differently to look at the respective "language" column to achieve the same results and this works across variations so when viewing the same page property in another variation picked up the correct values (it uses the Item ID in precidence to the Item Value).
We also had a multi-lingual data migration which was a huge pain, but we managed to find out how the Variations are set up (the code, unfortunately is obfuscated!!). Using the same mechanisms we uploaded an entire multi-lingual site into a variation structure without problems.
We also had problems creating Variation Sites when using a default.aspx file which used one of our custom page layouts (believe it or not) - an invalid cast exception. We eventually found out that the default.aspx page has to be a SharePoint layout page for the Site Variation to get created, and then you can remove it!
There's a lot a shakey stuff in the whole Variation functionality but I have to say that without it, the project would have been impossible (but probably much less stressful!!).
Saying all this, however, we've had a lot of problems with Variations not working and breaking links which we have eventualy fixed
Hi,
I created a Variation label and created hierarchies for Arabic version of my portal, now I can see 2 home page tabs and one more tab
for Arabic version portal. Now I just want to delete what I created. How can I delete? any ideas? And want to inform you one thing, home
page of my portal has been changed to the Arabic version. I want to reset my home page to English version, please do needful..
Cheers,
Naresh
@Naresh,
deleting the variation hierarchies is not as straightforward as it should be. You should first go to the variation hierarchies page and delete them from theree. However, this will not delete the sites! The sites should then be deleted manually (via Site Settings or Manage Content and Structure).
Changing the language of a site after creation is not possible/supported (but have a look at http://www.sharepointblogs.com/mirjam/archive/2008/04/29/changing-the-language-of-an-existing-sharepoint-site.aspx for a hack).
Hello Sjoet,
It was an awesome post.
I have a few confusions, I hope you would be able to help.
I have the site collection already created. The pages are customized. The site is huge, so have to enable variations on the same site.
1. For customized pages, is it necessary to write customized site definitions and propagate using those definitions. Is it possible in my case.
2.Its a huge site, is there a way to do variation on it step by step i.e. taking a few sites at one time etc.
Thanks for sharing!
mscs111@hotmail.com
Hello.. i am having several issues with variations.. here is one that i hope someone can help me with.
error:
The variation system failed to pair up pages because their Content Types do not match
what is the best or easiest way to fix this?
does anyone know?
I have been working with variations on MOSS 2007 and I must say I am not too happy with them thus far.
My problem currently is this and I am hoping someone can help me.
I have a site called “SiteA” and I need to create 10+ variations of it for different countries.
When I create the variation all relative links with in the content stay the same. For example
http://www.mysite.com/SiteA/ is my variations source site with Variation label SiteA
and I create a variations with variation label name SiteB so I would have http://www.mysite.com/SiteB/
All the links with in the content of SiteA would be like: http://www.mysite.com/SiteA/Products/Pages/product.aspx
So in the variation SiteB all URL links should have been updated from SiteA to SiteB…
I was under the impression that variations would automatically update all relative links and URL’s within the site. Is that true?
If not is there an easy way in SharePoint Designer 2007 to use something like Find and Replace for the entire site instead of having to go in to each page and do it manually?
Any help and response would be greatly appreciated.
I would like to offer up an application that I wrote that helps manage (and repair) SharePoint Variations.
http://www.thesug.org/blogs/lsuslinky/Lists/Posts/ViewPost.aspx?ID=25
Thanks a lot;good post
you classified our problems with variation..
i believe that Variation is SUCK!
it's kind of not stable method designated by some kids @ MS,,sometimes it works,sometimes not.
I don't know whats the benifit of translated cols when it judt do nothing?
i think MS has to support an usable solution for multilingual issue in next moss.
regards
Is there any way to hide the variation labels from the horizontal menu???
I just need to have there something like
Products
--X
--Y
--Z
Services
--A
--B
--C
And NOT
English
--Products
----X
----Y
----Z
--Services
----A
----B
----C
Spanish
--Products
----X
----Y
----Z
--Services
----A
----B
----C
People who browse the navigation do not care about the languages, why should they have to click their language to get to the menu itself?
Thanks :)
Post a Comment