509.949.2162 jeremy@bondbyte.com

Problem: When Creating Sites within a Web Applications Site Collection the Master Page can be set to inerhit but new sites do not enherit from the master page as expected. This is due to a bug in Microsoft sharepoint and has been deemed as a low priority. You can read more information below. http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/46ae97fe-0dda-4122-a725-acacb687c74a/#page:2

Reproduce: Defined a new master page and set it as default for the main site. Any time you create a new subsite it does not apply the new master page and defaults back to the default.master. The Site Master Page Settings shows this error. The site master page setting currently applied to this site is invalid. Please select a new master page and apply it The system master page setting currently applied to this site is invalid. Please select a new master page and apply it. Now if you select “Inherit site master page from parent of this site” and “Inherit system master page” and click ok the site will use the new master page and everything is fine.

Solution: Add a SQL trigger to the content database that forces the master page to be changed when it is created


CREATE TRIGGER USP_UpdateMaster_jb

ON Webs

FOR INSERT

AS

BEGIN

UPDATE Webs

SET CustomMasterUrl = '_catalogs/masterpage/BlueGlassBand.master'

UPDATE Webs

SET MasterUrl = '_catalogs/masterpage/BlueGlassBand.master'

END

GO