How to fix "</Value is missing a closing tag at Line 1, Position 307"

Half-way through updating a citation in RM9/Mac the program just stopped working. I can get back in and everything seems to work OK except when I try to edit the person or the citation. Then either RM9 exits or I get an Unexpected Error dialog box that says “</Value is missing a closing tag at Line 1, Position 307” and I dutifully sent off the error report.

I don’t want to reload from a backup as I have done quite a bit of work prior to this problem. Is there any way I can fix the problem myself? I’ve tried running any tool that looks like a problem fixer without success.

Any suggestions?

Can you delete the Citation? Not the ‘uses’, they should go when the Citation is deleted. If so, then recreate it and retag its uses.

The Citation level data is stored in XML format and it looks like that one is screwed up, probably by a previous system disruption during its creation or editing. Either the tag is missing or it is truncated as it is in the error report or it has not been followed by </fieldname>

1 Like

Thanks Tom - unfortunately any attempt to access the citation (indeed any attempt to open the person view for the individual in question) results in the aforementioned Unexpected Error dialog box, so I am unable to delete the offending citation.

Cheers … John.

Maybe you can get at the Source via the main view. If it is used only the once, you could delete it.

Otherwise, the only lossless way is to burrow into the CitationTable with sqlite and edit or delete it.

Thanks Tom - I tried to delete the Source via the Sources view but this resulted in the dreaded Unexpected Error dialog box :frowning:

-First, attempt export of a full GEDCOM via File->Export Data.
-Second, can you do a backup successfully without error? If yes, then.afterwards… do a restore from that backup BUT don’t restore it as the same database name which would overwrite your original source database. Pick a new name and see if it restores to a new database successfully. Start working with that copy to troubleshoot.
-Now, doing all troubleshooting from the new copy. There’s a very small chance that citation error may not be reported in the restored copy but check anyway.
-If the error persists, close the original source database for the time being. Create a (now third), but related, new empty database.
-With both the copy database and the empty database each open to Pedigree or Family view (in separate windows) … click your mouse pointer upon any person “box” in the copy database, hold down left mouse button and drag that individual (across windows) into that empty database and drop them.
-When prompted by dialog,choose to copy everyone from database over to empty one.
-Now examine that person in that destination database for continuation of the citation error and for editing it or deleting it.

-The only other way to approach this would be understanding that the saved GEDCOM can be edited in a text editor and the lines for this source citation removed. But you have to have that understanding and skill set.

Further to @kbens0n , it looks like the problem is in the SourceTable where the master source data is also stored in XML format. There’s a remote possibility that the fault lies in the SourceTemplateTable. Do you know what Source Template the Source uses? Can you open and edit the Source Template? If you can, then it is the SourceTable which is the foul meat in the sandwich.

So another option is to submit a help request to Tech Support along with your database but I do not know if they have the skillset to do surgery on the database. The two developers do.

Support typically does drag’n’drop or GEDCOM export as their cure-all but I suspect that will also fail when it hits the offending Source. If the Source is used by just the one person, the GEDCOM drag’n’drop method might work on a piecewise basis, e.g., mark everyone in the database and unmark the one person for the transfer and then rebuild and relink that person. However, there may be stuff you won’t be happy to lose, see
https://sqlitetoolsforrootsmagic.com/gedcom-dnd-transfer-losses/

The ultimate possibility is sqlite surgery.

Just realized it hasn’t been asked if you ran:

Database Tools from Command Pallette (paint pallette icon in upper right corner)

This certainly should be executed if it hasn’t yet been done so.

Thanks Tom and Ken - I agree the problem is in the Source area: I deleted the offending source and the person is now displayed however the problem persists. I also ran all the database tools from the command palette. However at this point I have decided to bite the bullet and restore from a known backup - I feel the current database is corrupted beyond repair.

It could be corrupted in more than one table. If you like, I could have a look at it to see if there is just the one record at fault and try to fix it. PM me. No promises…

Many thanks for your kind offer Tom - I will certainly keep this in mind when (not if) I strike another tricky corruption problem. However for now I have successfully recovered from restoring the last good backup and adding the small number of missing information.

1 Like