I was at a client recently where I had created a Solution Package for bundling up a Feature that provisioned the Master Page, stlyles, Page Layouts, etc., for a Publishing Site, as well as a Site Definition that included homepages for each site.

The client started getting an error every time they tried to edit certain pages on the site. Whenever they added a web part to a page, or clicked up a button in the Content Editor Toolbar, they would be redirected to an error page that would tell them, “This page has been modified since you opened it.” If they went back to the page and tried to edit it agian, they were able to make their changes.

There were several issues that seemed mysterious about this issue:

  1. I was not getting the error in my development environment and the client was getting the error in their environment.
  2. It only seemed to happen to several pages.

After much pain and aggrevation, we determined the error only happened when a user was editing a site’s homepage. Furthermore, we discovered that the issue only seemed to happen on boxes which had SP1 installed. (My dev environemtn was a pre-built VPC and it didn’t have SP1 installed, whereas the client had installed the service pack.)

After even more pain and aggrevation, we eventually realized that the issue was the Page directive. (Much like the issue in my previous blog entry!) I was operating under the assumption that the default page for a site would be identical to the Page Layout it was associated with. That being the case, the namespace I had applied to the default pages was this:

Microsoft.SharePoint.Publishing.PublishingLayoutPage

It turns out that the homepage for a site needs to have this as the Page directive needs to be this:

Microsoft.SharePoint.Publishing.TemplateRedirectionPage

Again, having the PublishingPageLayout namespace only seems to throw an error after SP1 has been installed.