InfoPath cannot save the following form: TemplateXX The form is read-only. RRS feed

  • General discussion

  • Hi,

    I spent two days on this one and want to share my results with you, as the error message is (again) giving no hint on a possible solution ;-)

    Following situation:
    I am creating InfoPath 2007 forms with Visual Studio 2008 with code-behind for use in MOSS together with a colleague using TFS.
    Everything "worked fine for years" (despite the fact that TFS integration with InfoPath in VS2008 isn't really the best...don't ever forget to check out the complete InfoPath project before opening the manifest.xsf!), when all of a sudden I started getting the following error message when trying to save my changes to a form:

    InfoPath cannot save the following form: TemplateXX The form is read-only.  (ERROR A)

    I found a few answers on the internet, but none worked for me.
    So I started having a look at the other warnings I got when opening a manifest.xsf, which I normally just "clicked away".

    "This form template was published to one location and has been saved or moved to a different location. to ensure that forms based on this template work correctly, publish the template again." (ERROR B)
    "An error occured while verifying the form termplate" with the details: "InfoPath either cannot connect to the data source or the service has timed out." ("ERROR C"...this is not really an error)

    I opened the manifest.xsf in notepad and found that the publishURL attribute contained a weird path and the runtimeCompatibilityURL attribute pointed to a URL on the developer machine of my colleague.

    Solution for ERROR A and B:
    Right-click the manifest.xsf --> open with --> XML Editor
    Search for the attribute publishUrl and empty the value (publishUrl="")

    Solution for "ERROR C":
    As you still got the manifest.xsf open in xml form ;-) search for the attribute runtimeCompatibilityURL and change it to a URL available on your development environment


    Monday, April 20, 2009 12:58 PM

All replies

  • Thanks for your solution, it saved the day...
    Thursday, June 25, 2009 2:33 PM
  • Works great!  Interesting that when I tried it, after I closed the manifest.xsf file without saving, it seemed VS2008 still had it locked so I couldn't edit it with notepad.  I closed VS2008 and edited fine when I navigated and opened the file in windows explorer.

    Thank you.

    App Dev Manager
    Tuesday, December 8, 2009 4:05 PM
  • Ah, great. Thanks much. 
    Friday, June 4, 2010 4:27 PM
  • I upgraded several Infopath 2003 managed code solutions, and I had this issue when I opened it up in Visual Studio 2008. What I tried the above instructions and what I found was that when I published a new Infopath template in Visual Studio 2008 the publishUrl field dissipated completely. So instead of 'blanking it out' I simply deleted the field altogether. 

    Now, I tested everything around the form and it worked fine without the field. Is this not needed in Infopath 2007? or is it now used elsewhere and not on the manifest.xsf? 

     Either way, I deleted it altogether and it worked for me.

    Wednesday, April 13, 2011 9:29 PM