Skip to main content

I just took over a piece of sharepoint /infopath code and the original developer left without leaving any notes. when i checkout the code and deploy this sharepoint workflow with infopath web browser enabled, i first get the error 'The following location is not accessible, because it is in a different site collection [location of my xsn infopath form]. this appears after the first time I try to open the form as a detail of a infopath error. when i click ok, it shows "The form has been closed" and then until i reboot the server, it will persist with the "The form has been closed" message straigh away.  The infopath form is set to be web compatible and the infopath services are enabled but still doesn't work.

 


(just narrowed it down to the first problem ''The following location is not accessible, because it is in a different site collection olocation of my xsn infopath form]'. the "The form has been closed" happens after clicking the close button of the first message


 



I seem to recall that this (or something similar) occurs when you move an infopath form between environments (eg dev to production). When infopath forms are deployed, you can set up your dataconnections so that they are referenced relative to the site collection in which the form is deployed. Unfortunately, when K2 deploys the infopath forms, it does not seem to update the references to the new site collection, but rather keeps the original references, which will point to your previous environment.


ie when you develop a form with a datasource in your DEV environment, and then move that to your PROD environment, the form in the PROD environment will still be trying to use the datasource in your DEV environment.


To fix this, I follow the steps below.
1. deploy the form to production
2. Open the form template from your PROD environment in design mode in Infopath
3. From the File menu, choose "SAve as source files" and save them to a directory somewhere
4. close infopath
5. go to the directory where you saved the source files, and open the file manifest.xsf in notepad
6. find any references which still point to your DEV environment, and correct them so they point to your PROD environment
7. Save and close manifest.xsf
8. right click manifest.xsf and choose "Design" - this will open the form in infopath again.
9. publish the form - I don't think you need to change any of the default settings, just run through clicking next, and it should be OK. I think you are also prompted to save the form first, so save it somewhere locally.


Your form template should now be updated with the correct data sources, and it should open up OK.


I am writing this from memory, so hopefully I haven't missed any steps.


Hope this helps....


Reply