Corrupt InfoPath fails to load in Web browser (Forms Services)

  • 10 December 2009
  • 8 replies
  • 2 views

Badge +4

I have a corrupt InfoPath Form.


If I create a new blank workflow with this existing form - setting the Form Client to Web browser - and publish this form to a SharePoint Form Library it will try to open in a client browser.


If I create a new blank workflow with a blank InfoPath form, the form will open correctly in a Web browser.


What behaviour would prevent K2 from correctly deploying/publishing the InfoPath form as a Web browser form?


 


Thanks.


 


8 replies

Badge +5

I'm assuming when you were saying that it opens in the client browser, you mean that it opens with the InfoPath client.


Is the pre-existing form have any code-behind or set to full trust?

Badge +4

Yep - client.


No - nothing special about it.

Badge +5

These 2 workflows you created, are they both pointed at the same library? I'm assuming you have set the SharePoint form library to "Display as a Web page" in the advanced settings.


Once again, I'm sure I'm stating the obvious, just want to make sure, but is the existing form set  as browser-compatiable?

Badge +4

Thanks for your help.


Yeah, I'm reusing the same library to test. Though I have deleted and recreated this library several times (and tried different names in case as well).


Yeah, the form was working fine as a browser compatible form - now it's corrupted somehow. I'm currently trying to roll-back to an older version of the form and see if that helps.

Badge +4

I'm trying to switch-out the corrupt from with an old backup but can't find an orphaned XPath query:


(UserAccessAndHardwareRequest_v4_1) Process xmlfield 'Template1' does not exist.


This frustratingly doesn't give me enough information for where to look for the compile error.


----


Cracking the project's XML gave me a clue to fix it but wow I'm just glad it's Friday.

Badge +5

Yeah, look in the manifest.xsf in the template. Once you remove that, repackage the cab file and try it.  A hint to make sure the manifest is clean is to just try to open the manifest in infopath.

Badge +4

Thanks - once I added the old InfoPath form in - as an additional InfoPath template - and changed all the XPath queries and deleted the old one, it's now working!


Notes:



  • Even though I've said in the Solution Explorer to delete the old InfoPath form, it doesn't get deleted. But fortunately it's not in the drop-down of available InfoPath Form Templates in a Wizard.
  • My guess of cause: 

    • Adding (another) InfoPath Form from an InfoPath Client Event (which I think I did trying to get something else to work). Instead always configure the InfoPath Form from the Integration/InfoPath Forms Wizard. Not sure how this corrupted the InfoPath Form, but it's all I can think of.
    • Repackaging a CAB when trying to bulk-apply Conditional Format rules.



Yeah, the Manifest.xml is a good idea - but repackaging the CAB makes me suspicious as (as per above 2nd point) it could caused the issue.


Have you repackaged CABs before ok?


 


 

Badge +5

Glad you were able to resolve this.


One thing, as you mentioned, is that once you integrate an InfoPath form with a K2 process, ALWAYS edit the form through the integration wizard by clicking on the design button. Doing so will update K2 data fields every time you close the form and is necessary to sync correctly with your K2 process.


I don't recommend repackaging the CAB files unless you're extremely careful and know what you're doing. Yes, I've successfully repackaged CAB files numerous times.

Reply