Tuesday, February 26, 2008

Where is the rest of my site?

Over two months ago ( you can tell how far behind I am in my blog posts) I built out a French variation of our clients site on our development server, just to get an idea of what the variation mechanism would rebuild. It took nearly 8 hours to build it (it is a very large site) and I selected the option to build both the sites and the pages.

When it was done creating the hierarchies, I started poking into the French site with SharePoint Designer. The first thing I noticed was that all of the pages were in draft mode, which makes sense. With the page in draft mode, you can send the text out to be translated and insert the translated text into the site and approve the page.

The next thing I noticed was that all of the custom lists and document libraries that I created in the English site were not created in the French site. I found this a little odd in that the columns would be the same in the lists and libraries. I did some poking around and found that the variations will only create the pages and any document libraries and lists that the system needs.

The last thing I noticed was that the documents that we placed in the documents document library in some of the subsites were not created. So I had to recreate those documents myself.

Other things to notice include if you add any custom code to the page layouts, some of the pages may not work in your new variation especially if the logic is looking for a specific column or custom list. Once you recreate the column or list, though the page will work fine and will still contain all of the data that the original page did.

In my next post I will be discussing a sample plan for the location of files in a multi-lingual SharePoint site.

Labels: ,

Wednesday, February 20, 2008

Variations Make the World Go Round

The next few posts concern some recent finds when working with the variation mechanism in SharePoint. Variations allow for the quick creation of language sites and allow you to add workflow items for translators to translate the text and then submit the page for approval. An approver can then approve the page, where it will be available on the site. Variations work by creating a landing page in the top site which has some logic to determine the default language of the user's browser. If there is a variation with that culture set, then the user is redirected to that version of the site. If there is not a site with that culture, the user is sent to the default culture site. Each language is a subsite in the SharePoint hierarchy.

While the built-in landing page provides some very cool functionality, (to determine the users preferred browser language and direct them to the appropriate variation), what happens if you want to store the user's language preferences in a user profile or in a separate data store. Well you can modify the landing page and add your own logic to create the preferred action that you want.

This site demonstrates how to customize the landing page to pull data from a user profile to determine which variation the user should be sent to.

Labels: , , ,

Monday, January 7, 2008

The Greatest Christmas Gift Ever

This post has been a long time coming but I have been busy lately with some project work due to the fact that I finally received my hotfix from Microsoft to allow me to build a French variation for my client.

This long ordeal began last September when we were getting ready to start building the French language version of a site for our client. I wanted to see which items would be copied over with the variation mechanism, so I ran it on our development environment. About three pages into the creation of the variation hierarchies, the variation deployment failed with a primary key violation. So I tried to delete the partially done French version and start over. Same thing happened.

So the next most logical thing to do was to call Microsoft and submit a ticket. After waiting for the call back and explaining the problem to the tech, as well as showing him through a net meeting, the tech finally came back and said there was a hotfix available for the problem. He sent me the hotfix and I installed it on the development server and ran the SharePoint Technologies Configuration wizard.

I thought I was off and running again so I created the French variation label and clicked to build the hierarchies. This time it ran for 4 hours and then died with an error message that read "Server out of memory." I didn't think this was possible, so I poked into the SharePoint log files and found that sure enough the server had run out of memory. I looked further back in the logs and soon found out why it ran out of memory. There were hundreds of entries that read "Excessive number of SPRequests objects are not being disposed of. Check to make sure that SPWeb and SPSite objects are disposed." The number of request objects was around 964 when the server ran out of memory.

Once again I called Microsoft and submitted a ticket. I sat on the phone with the tech and explained the problem and what I did to get the error. Then I ran the typical SPSReports tool to gather information for them to look over. After a few weeks I received an email that said my case was being reassigned to a new tech. So the new tech called me and asked the same questions. He wanted to watch the server to see what happened so I reran the variations and he watched and I pointed out that SPRequests were not being cleaned up (this was something we realized we had to do earlier in this project in our own code). After 4 hours of being on the phone while it ran, the variations died with the server out of memory error. We reran the SPSReports tool and the tech said he would get back to me with the results.

About a week later I heard back from the tech that there wan one other person having this issue and that the SharePoint team was working on a hotfix for the issue. He said it should be out in the next two weeks. So I waited and waited and after two and a half weeks emailed the tech only to find out that my case was being passed onto another tech because the previous was going to training.

Now the third tech said that the hotfix should be out shortly and that they would let me know when. About a week later I received another email saying that this hotfix was not going to be included in SP1 and that I needed to hold off on installing SP1 until the post-SP1 hotfix was out. That was fine with me, it was more important to build this variation anyway. So I was optimistic that the hotfix would be out soon.

After about 6 more weeks of emailing back and forth with the techs about the status of the case, I finally received an email saying that the case had been escalated and that more resources were being put on the hotfix.

Another 2 weeks later, now almost Christmas and I finally received a call from someone at Microsoft saying that the hotfix was ready.

We installed the fix between Christmas and New Year's and it worked wonderfully. The 2,300 page site was built out in the French version. It appears that the hotfix calls the garbage collector more frequently and this causes the garbage collector to clean up those SPRequests that were lying around.

So now I am working on creating the French version of a very large site. Look for more posts soon about the issues that come up when building a multi-lingual site.

Labels: , , , , ,