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 Mircosoft. 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.UIVersion=3
$web.UIVersionConfigurationEnabled = $true
$web.Update()




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
$web.Update()

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.

Because



  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 UIversion 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.




Be Connected…

Satyendra

 

THREE QUERIES offers easy access to information about SharePoint and associated technologies, project management, agile and scrum methodologies that helps developers, administrators, architects, technical managers, business analysts and end users. It has grown from there. We provide an important knowledge base for those involved in managing, architecture and developing software projects of all kinds. With weekly/daily exclusive updates, we keep you in touch with the latest business, management, technology thinking.

WE ARE CONNECTED ~ Follow us on social media to get regular updates and opinion on what's happening in the world of SharePoint, front-end, back end web technologies and project management. If you like this article, please share it and follow us at Facebook, Twitter, Instagram, Pinterest and LinkedIn

,

About Satyendra Mishra

Microsoft certified, motivated, energetic and accomplished SharePoint Consultant and Architect with 13+ years of work experience in Management, Architecture, Analytics, Development and Maintenance. He has been fortunate to be a part of over 20+ Web/Mobile/Software SharePoint and .Net projects delivery with various companies across different industry sectors. This has provided him a valuable insight and experience especially in successful implementation of technology solutions. Having very strong System Architecture, Technological, Management & Analytical Skills, Knowledge of Office 365, SharePoint, .Net, JavaScript, React, Angular, Azure, SQL. In 2016, he decided to start sharing the knowledge back to society in the form for content writing and blogging.
View all posts by Satyendra Mishra →

Leave a Reply

Your email address will not be published. Required fields are marked *