Partager via


Resolution: MOSS: This Page has been modified since you opened it. You must open the page again.

Behavior/Symptoms:

Whenever user tries to add a web part to the page, he gets the following error message
"This Page has been modified since you opened it. You must open the page again."

If he refreshes the page and adds, It works. User has a custom site definition.

This problem suddenly appeared after applying SP1, till then it was working fine.

Cause:

Use of PublishingLayoutPage instead of TemplateRedirectionPage in custom default.aspx

Resolution/Workaround:

Replace
<%@ Page language="C#" Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage, Microsoft.SharePoint.Publishing,Version=12.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c"
metarogid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>
with
<%@ Page language="C#" Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,
Microsoft.SharePoint.Publishing, Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" metarogid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>

I have investigated the details about PublishingLayoutPage and TemplateRedirectionPage. There are additional methods(IHttpHandler implementation) available in TemplateRedirectionPage to process the request. PublishingLayoutPage and TemplateRedirectionPage both inherit from PublishingCachablePage class and in addition to that, TemplateRedirectionPage implements IHttpHandler also which takes care of setting up the page context (session and other states) so this clearly indicates that it will clear out the session expiration problem. OOB publishing site is also using TemplateRedirectionPage. In SP1, Product team might have tightened up some missing parts(security checks/design changes etc…) to execute the page so the problem has appeared after SP1.