In the last two weeks I have encountered two customers that have experienced this problem, therefore it seems logical that more people are going to encounter this problem. This is not an actual error on Sharepoint, but more a misunderstanding of how Sharepoint works and handles Master Pages.
The problem occurs when people start using Sharepoint Designer to change or apply a new master page to a Sharepoint Site and follow the normal sequence of events:
- Create a new Master Page or Download a new master page.
- Apply the master page to a Sharepoint site.
- Save or publish the site with the new master page.
At this point the problem occurs. You will find that when navigating to the Sharepoint site, that the site collection or site administrators can view the site perfectly, but all the users get an error "Access Denied".
The default reaction at this point would be to go and check the security settings, which is what people do. They spend hours changing security and testing and all to no avail. This is due to the fact that the problem lies with the new Master Page and not the security.
To understand the solution to the perceived problem you need to understand where Master Pages are stored in Sharepoint and also how they are managed.
- Master pages are stored in the "Master Page Gallery" at the site collection level.
- The gallery is merely a document library that saves web pages, specifically Master Pages and Page Layouts.
- There is an "Approval" workflow rule attached to this document library for security reasons.
- New Master pages and page layouts therefore need to be approved before they can be applied.
The problem occurs when the master page is published from Sharepoint Designer. SPD publishes the master page into the "Master Page Gallery", but the workflow rule then kicks in and places the page into an unapproved state. This is what causes the "Access Denied" error for the users of the site.
To fix the problem is quite easy:
- Navigate to the site settings page
- Select the Master page gallery from the list of options.
- Navigate down the list of master pages and page layouts in the gallery to the master page causing the problem.
- Choose the drop down arrow next to the page and select "Publish" from the drop down menu.
- Choose the drop down arrow next to the page and select "Approve" from the drop down menu.
- The status of the page should now have changed from "Draft" to "Approved". Problem Solved.
I hope you find this blog useful if you ever encounter this problem and please post comment on your experiences.
Minimal Master page in Sharepoint Designer
Creating a new Sharepoint site using Sharepoint Designer
Giving Anonymous Access to Users on a SharePoint Site