SharePoint Rita

All about SharePoint architecture, development, infrastructure, security; .NET development; and more...

InfoPath 2010 browser-enabled forms cannot be opened - "The following document is not a valid InfoPath form"

InfoPath 2010 browser-enabled forms cannot be opened - "The following document is not a valid InfoPath form"

  • Comments 1
Environment:
SharePoint 2010, InfoPath 2010 browser-enabled forms
 
Issue description:
We have alot of InfoPath forms in SharePoint 2010.  These forms were migrated from InfoPath 2003 client to InfoPath 2010 browser-enabled. Occasionally a few InfoPath forms cannot be opened in browser with the following error:
There has been an error while loading the form.
The following document is not a valid InfoPath form: {path of form}
  
Cause:
After doing some research and comparision, I noticed that we have a rich text field in the form that users use to copy and past html content from the internet. The pasted content includes the following string that caused this issue:
<?XML:NAMESPACE PREFIX = "[default]" http:="http:"  xmlns:http="urn:http"  ?>
 
Resolution:
  • Download the form to local machine. Open the form in notepad. Find the above string and delete.
  • From SharePoint library, find the affected item.
  • Checkout the item (if checkout is required)
  • Upload a file to the library, point the path to the local path of the newly saved xml file.
  • Save
  • Open the form from SharePoint, it should open in browser without any issue.
 
Comments
  • Infopath is very hard to work with!

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post