Recover a lost template

B

Bryan

I had to reconstruct a form template, I needed to switch from vbs to js and
could not switch on original template, and saved the new template over the
old.
Now all of my old forms, created with old template, will not open, error
message;
"Infopath cannot open the following file; dan021606.xml.
The form containes schema validation errors."
Detail;
"The element
'{http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05}myFields' is used but not declared in the DTD/Schema."

Is there any way to open one of the old forms to recreate the old template?
And no, I do not have a backup of the old template (I do of the new one
though).
Bryan
 
G

Greg Collins [InfoPath MVP]

When you created the new form, it was assigned a new Form ID.

If you compare your old forms to a newly saved form you will that the following does not match in one of them:

schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05

This is because each form template is assigned a unique Form ID.

You can fix this however, by getting your old Form ID from the .xml file, and then opening your form template, and choosing Proeprties from the File menu. There you can set your new template to use the same Form ID as the old template did.

This should fix your probelm with opening old forms.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


I had to reconstruct a form template, I needed to switch from vbs to js and
could not switch on original template, and saved the new template over the
old.
Now all of my old forms, created with old template, will not open, error
message;
"Infopath cannot open the following file; dan021606.xml.
The form containes schema validation errors."
Detail;
"The element
'{http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05}myFields' is used but not declared in the DTD/Schema."

Is there any way to open one of the old forms to recreate the old template?
And no, I do not have a backup of the old template (I do of the new one
though).
Bryan
 
B

Bryan

Greg,
That helps a lot but I have one question, how do I do that?
I do not have access to the old template and when I try to copy a template
path if the library settings I get an error;

Invalid template URL

The template must exist in the Forms directory of this document library.
Create the template in the Forms directory, and then re-type the Web address.
Note that you cannot move or copy a template into the Forms directory.

When I try to publish a new template to the library I get an error;

InfoPath cannot modify the form library template because the file does not
exist. Copy the template to the form library or create a new form library.

So I cannot open any of the forms with the bad schema link and I cannot add
a new template to the library.
Any ideas?

Bryan
 
G

Greg Collins [InfoPath MVP]

You don't necessarily need the old form tempalte since you have old forms. The Form ID is specified in the form XML file. You would update that old Form ID right in the XML file itself to be the Form ID of your new form template.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Greg,
That helps a lot but I have one question, how do I do that?
I do not have access to the old template and when I try to copy a template
path if the library settings I get an error;

Invalid template URL

The template must exist in the Forms directory of this document library.
Create the template in the Forms directory, and then re-type the Web address.
Note that you cannot move or copy a template into the Forms directory.

When I try to publish a new template to the library I get an error;

InfoPath cannot modify the form library template because the file does not
exist. Copy the template to the form library or create a new form library.

So I cannot open any of the forms with the bad schema link and I cannot add
a new template to the library.
Any ideas?

Bryan
 
B

Bryan

Greg,
I understand what you are telling me to do but I have to ask a complete
newbee question, sorry. How do I open the old forms to edit the xml file?
The forms are stored in an sql database.
Bryan

Greg Collins said:
You don't necessarily need the old form tempalte since you have old forms. The Form ID is specified in the form XML file. You would update that old Form ID right in the XML file itself to be the Form ID of your new form template.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Greg,
That helps a lot but I have one question, how do I do that?
I do not have access to the old template and when I try to copy a template
path if the library settings I get an error;

Invalid template URL

The template must exist in the Forms directory of this document library.
Create the template in the Forms directory, and then re-type the Web address.
Note that you cannot move or copy a template into the Forms directory.

When I try to publish a new template to the library I get an error;

InfoPath cannot modify the form library template because the file does not
exist. Copy the template to the form library or create a new form library.

So I cannot open any of the forms with the bad schema link and I cannot add
a new template to the library.
Any ideas?

Bryan
Greg Collins said:
When you created the new form, it was assigned a new Form ID.

If you compare your old forms to a newly saved form you will that the following does not match in one of them:

schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05

This is because each form template is assigned a unique Form ID.

You can fix this however, by getting your old Form ID from the .xml file, and then opening your form template, and choosing Proeprties from the File menu. There you can set your new template to use the same Form ID as the old template did.

This should fix your probelm with opening old forms.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


I had to reconstruct a form template, I needed to switch from vbs to js and
could not switch on original template, and saved the new template over the
old.
Now all of my old forms, created with old template, will not open, error
message;
"Infopath cannot open the following file; dan021606.xml.
The form containes schema validation errors."
Detail;
"The element
'{http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05}myFields' is used but not declared in the DTD/Schema."

Is there any way to open one of the old forms to recreate the old template?
And no, I do not have a backup of the old template (I do of the new one
though).
Bryan
 
G

Greg Collins [InfoPath MVP]

I'm no SQL expert, but you will have to either modify the text directly in SQL, or if that is not possible, you will need to pull the form somehow and store it as an XML file on your drive, update it, and then stuff it back into SQL. How you do that, I'm not sure. But since they have some way of feeding the SQL-stored form to InfoPath, there must be a way to get it out and back in once its fixed.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Greg,
I understand what you are telling me to do but I have to ask a complete
newbee question, sorry. How do I open the old forms to edit the xml file?
The forms are stored in an sql database.
Bryan

Greg Collins said:
You don't necessarily need the old form tempalte since you have old forms. The Form ID is specified in the form XML file. You would update that old Form ID right in the XML file itself to be the Form ID of your new form template.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


Greg,
That helps a lot but I have one question, how do I do that?
I do not have access to the old template and when I try to copy a template
path if the library settings I get an error;

Invalid template URL

The template must exist in the Forms directory of this document library.
Create the template in the Forms directory, and then re-type the Web address.
Note that you cannot move or copy a template into the Forms directory.

When I try to publish a new template to the library I get an error;

InfoPath cannot modify the form library template because the file does not
exist. Copy the template to the form library or create a new form library.

So I cannot open any of the forms with the bad schema link and I cannot add
a new template to the library.
Any ideas?

Bryan
Greg Collins said:
When you created the new form, it was assigned a new Form ID.

If you compare your old forms to a newly saved form you will that the following does not match in one of them:

schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05

This is because each form template is assigned a unique Form ID.

You can fix this however, by getting your old Form ID from the .xml file, and then opening your form template, and choosing Proeprties from the File menu. There you can set your new template to use the same Form ID as the old template did.

This should fix your probelm with opening old forms.

--
Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com


I had to reconstruct a form template, I needed to switch from vbs to js and
could not switch on original template, and saved the new template over the
old.
Now all of my old forms, created with old template, will not open, error
message;
"Infopath cannot open the following file; dan021606.xml.
The form containes schema validation errors."
Detail;
"The element
'{http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-04T16:03:05}myFields' is used but not declared in the DTD/Schema."

Is there any way to open one of the old forms to recreate the old template?
And no, I do not have a backup of the old template (I do of the new one
though).
Bryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top