Skip to main content

Cloud

Variation Labels (_Layouts/VariationLabels.aspx) is broken

I have been assigned on a project to investigate some issues with SharePoint Variations and the first issue I encountered was the error shows up when I click on Variation Labels link under Site Settings. The error pops up with a message “Object reference is not set to an instance of an object” and correlation ID.
As the error on the screen doesnt tell much I took the correlation ID and looked it up in the ULS logs several times and it appears to be complaining about resource file and the obvious answer to solve the issue to most SharePoint admins was to find the resource file and investigate where to get it from. The USL log looks like this:

Name=Request (GET:http://intranet/_Layouts/VariationLabels.aspx
Failed to open the file ‘C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\cmscore.en-GB.resx’. 
#20015: Cannot open “”: no such file or folder.
Failed to read resource file “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\cmscore.en-GB.resx” from feature id “(null)”.
Failed to open the language resource keyfile cmscore.
System.InvalidOperationException: Field not found: Label    at Microsoft.SharePoint.WebControls.DataBoundFieldHelpers.GetProperty(PropertyDescriptorCollection properties, String fieldName, Boolean isDesignMode) trols.BaseDataBoundControl.EnsureDataBound()     at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Leaving Monitored Scope (Request (GET:http://intranet/_Layouts/VariationLabels.aspx)
 

Reading ULS logs is sometime tricky especially when you have multi server farms. Though one thing worth mentioning here is that the errors roll up in sequence and the result of the error can be another error which is often misleading and its easy to lose the focus on the point of failure. As you can see in the above error, SharePoint is complaining about cmscore.en-GB.resx which indeed does not exist so one might go and start looking for the file where in reality it has nothing to do with any resource file and the underlying error is the unexpected occurrence of a field called Label.
I went to 14 hive layouts folder and opened up VariationLabels.aspx and turns out the field “Label” is being referened in the SPMenuField code just like this:
<SharePoint:SPMenuField HeaderText=”<%$Resources:cms,VariationLabels_List_Label_ColumnHeading%>” SortExpression=”Title” MenuTemplateId=”variationLabelMenuTemplate” TextFields=”Label“/>
So I started investigating in the right direction however the dilemma was why would OOTB page throw such an exception.
Upon investigating further and getting side tracked several times, I started digging more using powershell and found this excellent post http://passionatetechie.blogspot.com/2011/02/how-to-get-all-variation-labels-for.html about listing the variation labels. I could read the properties of a variation label without a problem so that didnt narrow down the issue either.
So basically VariationLabels.aspx page reads off the Variation Labels list which is a hidden list in the root web. So when you browse to the list, SharePoint redirects it to the VariationLabels.aspx page so not much luck in looking at the data there. So then it struck to me that the error is suggesting that it cannot find the field Label and then I thought to look at Variation Labels list settings by going to _layouts/ListEdit.aspx?List={GUID of Variation Labels list} and compared the field names with the freshly created site collection on a separate VM with variations and to my surprise the name of the Label field was changed to Title. So the variationlabels.aspx page looks reads the item data based on the display name of the field and not internal so it was expecting the display name of the field to be “Label” and not “Title” which is essentially the built in Title field. So I changed the name through SharePoint UI to Label and voila that fixed the problem.
I hope you will benefit from this experience and hopefully save a lot of time troubleshooting this uncommon issue. If there is any lesson to learn from this excercise, its nothing but “Do not mess with OOTB SharePoint resources”. SharePoint provides a great platform to put your customizations in place on top of what already exists without breaking into the existing stuff.

Leave a Reply

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.

Ashar Khan

Information Worker Solution Specialist with experience of building intranet & extranet portals for over 6 years using SharePoint technologies involving highly complex customizations for enterprises in order to deliver specialized business outcomes. With strong focus on .net frameworks 2.0 & 3.5 using C# and background in developing with Microsoft technologies I have developed various custom components and led complex deployments for SharePoint Server.

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram