Whilst working on a SharePoint 2010 site I needed to edit a web part. However, after I’d chosen to edit the page, clicking on the arrow to edit the web part didn’t do anything.
I ticked the checkbox and selected Edit Properties from the ribbon. This produced a File Not Found error.
I navigated to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS on the web front end server and opened the latest log file. Searching for FileNotFound found the error below
System.IO.FileNotFoundException: The file /hr/_catalogs/masterpage/_controltemplates/Welcome.ascx does not exist.
A quick Google for the error indicated that the error was related to the masterpage. This site has a custom masterpage which resides at the top level of the farm and when checked was fine. However, the error was being produced by the default.master masterpage for the site. Viewing the site in SharePoint Designer, I opened the default.master masterpage under _catalogs/masterpage and navigated to the top section of the file below
<%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”_controltemplates/Welcome.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”MUISelector” src=”_controltemplates/MUISelector.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”DesignModeConsole” src=”_controltemplates/DesignModeConsole.ascx” %>
The error is caused by the three lines missing ~/ from the src. Updating the tags as below fixed the error
<%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”~/_controltemplates/Welcome.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”MUISelector” src=”~/_controltemplates/MUISelector.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”DesignModeConsole” src=”~/_controltemplates/DesignModeConsole.ascx” %>