Can't Open File...Can't Fix (don't know code) - InfoPath Dev
in

InfoPath Dev

Can't Open File...Can't Fix (don't know code)

Last post 02-18-2010 12:06 PM by jerkham. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 06-18-2009 09:55 AM

    Can't Open File...Can't Fix (don't know code)

    Hi All,

     

    Not sure if I posted this in the right area of the forum but here goes.  I created a template file recently which took forever.  I went to open it this morning and I received this message:

     

    Infopath cannot create a new, blank form.

    Infopath cannot open the form. To fix this problem, contact your system administrator.

    Details:

    The form definition (.xsf) file cannot be opened because of an error.
    The file cannot be validated by the XML Schema.

    The keyref 'group1_4' does not resolve to a key for the Identity Constraint '{http://schemas.microsoft.com/office/infopath/2003/solutionDefinition}xmlToEdit_name_key'.

    Line 116, Position 5
      </xsf:view>

     

    Now I did some research and found that I had to open the manifest file in Notepad and adjust the code. The problem is..I'm not a programmer.  I know nothing about code or where to go or what to change when I find it.  Can someone tell me exactly what I need to do in laymen's terms to fix this problem?

     

    Much appreciated.

     

     

  • 06-18-2009 10:56 AM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    Hi, David:

    This kind of stuff is always kind of scary when it happens... First, save a copy of your template file (.xsn). Then, rename that copy -- change the .xsn extension to .cab. This will change the file to a cab file. Double click on your new cab file and you'll see all the files that make up your template.

    Copy all the files to a new folder, so that you can work with them. Take a deep breath, and right click on manifest.xsf. Select Open With from the context menu, and select a text editor like Notepad.

    Scroll to line 116, or search for group1_4, since it is giving you the troubles. Go ahead and copy from about 4 or 5 lines above to about 4 or 5 lines below and paste that into a reply, and we'll see if we can tell you what should be removed....

    Hilary Stoupa

  • 06-18-2009 11:04 AM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    Hi Hilary,

     

    Thanks for the quick reply.  Here's what I found (bold). There were actually a few instances of "group1_4" in the document but I went to the first instance that appeared after line 116. I'm guessing this is the right one. 

         </my:WeekInfo>
            </my:WeekInfoMaster>
           </xsf:chooseFragment>
          </xsf:fragmentToInsert>
         </xsf:editWith>
        </xsf:xmlToEdit>
        <xsf:xmlToEdit name="group1_4" item="/my:myFields/my:group1" container="/my:myFields">
         <xsf:editWith caption="group1" xd:autogeneration="template" component="xOptional">
          <xsf:fragmentToInsert>
           <xsf:chooseFragment innerFragment="my:group1">
            <my:group1></my:group1>
           </xsf:chooseFragment>
          </xsf:fragmentToInsert>
         </xsf:editWith>
        </xsf:xmlToEdit>

  • 06-18-2009 03:06 PM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    I would try removing the entire xsf:xmlToEdit element that begins with your bold line:

        <xsf:xmlToEdit name="group1_4" item="/my:myFields/my:group1" container="/my:myFields">
         <xsf:editWith caption="group1" xd:autogeneration="template" component="xOptional">
          <xsf:fragmentToInsert>
           <xsf:chooseFragment innerFragment="my:group1">
            <my:group1></my:group1>
           </xsf:chooseFragment>
          </xsf:fragmentToInsert>
         </xsf:editWith>
        </xsf:xmlToEdit>

    I think if you'd looked in design checker before the last time you saved and closed the form while designing, you'd have found a control with an error.

    Remove this section. Save manifest.xsf. Close the text editor. Then, back in your source files, right click manifest.xsf and select Design to see if it will open in design mode.

    If it does, you can use 'Save As' to resave all the expanded files as a template. If it doesn't, make note of the error, and go find the next issue in the file....

    Hilary Stoupa

  • 06-19-2009 05:04 AM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    That worked like a charm!  Thank you so much, Hilary!

  • 06-19-2009 08:39 AM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    Hooray! Now you don't have to rebuild the darned thing. For more information on the files that make up a form template, this Office Online article is helpful. I recommend you read it when you have a few minutes.

    Hilary Stoupa

  • 10-01-2009 01:18 PM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    This tip just saved me!

    Thanks!!

  • 10-08-2009 09:44 AM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    This is exactly what I needed to solve my problem. A life saver!
  • 02-18-2010 12:06 PM In reply to

    Re: Can't Open File...Can't Fix (don't know code)

    Great question and even greater answer.  I'm an Infopath newb and this discussion just saved me a LOT of time.  Thanks Hilary!

     Eric

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.