I have a feature which deploys a master page and changes the masterpage for all webs in the site collection. This works okay usually. We've had an issue two times, where all the aspx pages in the site collection doesn't work anymore, and it looks like it's related to this feature.

What's happening is that suddenly all pages return a 404. I have to open each aspx page and copy the content to a new page. Today I found out that checking out and checking in the file will also fix the issue.

What's strange is that the "Last Modified" date of the pages are weeks back in time, even though something must have corrupted the file the last hour.

If you are using SharePoint 2010, how about just deploying the masterpages via feature, but change the custom master url and system master url externally via PowerShell? See if the same behaviour happens. (Eg: vasya10.wordpress.com/2011/03/26/…)
–
vasya10Jun 17 '11 at 21:41

2 Answers
2

Are you sure it is the page returning 404 and not some item on the page or a dependency?

Assuming that is not the case, it sounds as though your reconfiguring of the master page has gone wrong. You will get a "404 Not Found" if the master page is missing.

Did you delete the old master page? Perhaps the master page link is wrong? When you re-create the page it will presumably have a valid link to the master page, which would explain why re-creating the page will work.