Saturday, 26 November 2011

Error in SharePoint 2010 designer while saving

If you create a site page with in the site created with Teamsite template the sharepoint look and feel for that site on save,Some time you will get  this error:"Content in the embedded form may be changed by the the server to remove unsafe content.Do you want to reload your page to see the results of the save"
and when you say reload,the server removes some parts of page,
e.g onclick event of html,asp buttons.

Actually It's not an error;

It's a warning, and you'll get it on Wiki pages.  It's for security purposes specifically on Wiki pages.
After much searching i decided that the team site has a wiki page with some kind of input form in it. and sharepoint thinks you are submitting the image or content.

By creating a blank page and put the same content in the blank page, there will no problem saving or displaying.

While searching i have seen a good reply, such as below

There does seems to be something wrong with pages based off of a wiki master page. Any content I put in with Sharepoint Designer (whether editing in advanced mode or not) comes up with "Content in the embedded form field may be changed by the server to remove unsafe content. Do you want to reload your page to see the results of the save". But if I create a blank page and put the same content in the blank page, there is no problem saving or displaying.

The most frustrating thing about this is the cryptic message itself. It isn't an error, it's a warning, yet it appears to strip out work, potentially hours worth of work. Someone could have worked for 6 hours on a page and it would appear that Sharepoint Designer just wiped it all out.

Sharepoint Designer looks and feels like a well polished product, but it doesn't act like a mature product at all. If there is a problem with content like a jpg being considered unsafe, for what ever reason, the product should say more about the problem and specifically point out the items that are in question like Visual Studio would with lines of code. My wild guess at this particular issue is that is is related to some kind of controls/restrictions (perhaps unwittingly) placed on content in the placeholder(s) at the master page level. As I said, if you create a blank page and put in the same content, there is no apparent problem.

No comments:

Post a Comment