This was occurring every time I tried to modify a shared web part, or anytime a user would try to submit a form. Eventually the transactions would complete successfully. It just got really annoying.
You may have detached the page from the page layouts after editing in in SharePoint Designer.
Add this script to the bottom of the page
I spent many hours/days/months looking for a solution to this issue. We were able to live with the annoying error, but our users were getting frustrated. Finally I came across a site that had the above code and explanation in it. I don’t remember the exact site (this was a couple of years ago), but I figured I would give some one a shout out anyway. I found the below link by doing a Google search and choosing one of the first links. If only it were that easy a couple of years ago!