How to Change UI Version of SharePoint 2010 Web Application

How to Change UI Version of SharePoint 2010 Web Application

Once, I was involved with migration (in-place) of WSS sites to SharePoint 2010 environment. In WSS environment, we have custom site definitions and master pages.

Migration was done successfully as per steps provided by Microsoft. But I faced few issues in newly created subsites. detailed as below:

whenever user creates a new sub site (using custom site definitions) in migrated SharePoint 2010 environment, he/she finds that newly created sub site is totally distorted. It shows dialog boxes (which are disabled itself, so doesn’t allow to perform) for adding/updating items or creating new list/site etc.. It does not allow to add web part on page using browser and also mercer theme is applied.

Now this is the time to see solution:

1. Open Management Shell as administrator

2. Run following commands to update UIVersion of sub site (keep handy subsite web URL)
$web = Get-SPWeb http://servername:80/sitename/subsitetitle
$web.UIVersionConfigurationEnabled = $true

3.  Then, run following command to update master page as same as root web
$rootweb = Get-SPWeb http://servername:80/sitename
$web = Get-SPWeb http://servername:80/sitename/subsitetitle
$web.CustomMasterUrl = $rootweb.CustomMasterUrl
$web.MasterUrl = $rootweb.MasterUrl

Actually, what was happening?
When user creates new sub site, SharePoint  parses our custom site definition and associates master pages with newly created sub site.

  1. Master pages were referring CSS file on wrong location, hence original theme was not applied.
  2. Sub site was created in SharePoint 2010 environment, hence it’s UI version was automatically set to 4 (For backward compatibility, SharePoint 2010 provides a new property to SPWeb class as UIVersion, value should be 3 for WSS/MOSS2007 and 4 for SharePoint 2010), which was causing new sub site to behave in mixed mode WSS and SharePoint 2010 (i.e. dialog boxes (which are disabled itself, so doesn’t allow to perform) for adding/updating items or creating new list/site etc. and not allowing to add web part on page using browser). As UI version was valued as 4, sub site was expecting ribbon in master page to add web part on site page, which was not available in our migrated master pages.

Hence, I did following actions, whenever new site is created, SharePoint:

  • Sets new sub site’s UI version to 3
  • Sets correct rootweb’s master page URL to new sub site.

Hope you enjoyed reading it.

Please don't forget to Share, Follow and Like to get updated with latest posts.

It gives me motivation to share more knowledge with you.

About Author

Satyendra Mishra

Project Management Professional (PMP) and Microsoft certified, motivated, energetic and accomplished Project Manager / Architect with 15+ years of work experience in Management, Architecture, Analytics, Development and Maintenance. I have been fortunate to be a part of over 25+ .Net / SharePoint projects delivery with various companies across different industry sectors. This has provided me a valuable insight and experience especially in successful implementation of SharePoint based solutions.

My experience in Web application implementation includes technology strategy and road-map definition, business and technical requirements identification, governance, platform architecture, solution design, configuration, development, quality assurance, training, post-production support, team lead and overall project delivery along with project management.

Satyendra Mishra holds a B.Tech. in Computer Science & Engineering and PG Diploma in Advance Computing from Center for Development and Advance Computing, Pune, India. He is also a certified Project Management Professional (PMP).

I love to share Project Management Tips and Tricks by writing Blogs in the Project Management India Community. I have written around 300+ articles in the Project Management, .Net, SharePoint and related client side technologies.