cgeltly / treechecker

Error checking for genealogical data files
GNU General Public License v3.0
2 stars 1 forks source link

Parse errors when families come first in a file #16

Closed cgeltly closed 9 years ago

cgeltly commented 9 years ago

In GEDCOM files exported by Ancestris (http://www.ancestris.org), the families are listed before the individuals, n.b. this is rare and most software exports individuals into the file first.

In ParseController method 'processChildren', a search for the individual is carried out to put a child in the children table, i.e.:

 `$ind = GedcomIndividual::GedcomKey($gedcom_id, $child)->first();`

The problem is that the individual doesn't yet exist in the individuals table, so a child is not added. It also causes problems with adding the spouse into the family. Fortunately this parse error is picked up by the 'no child id' error (http://www.treechecker.net/wiki/index.php/Errors:ChildWithoutID); however, this is not ideal.

Possible solutions: 1) Identify this problem, parse fail the entire file and report this to user (no ideal) 2) Find alternative way of parsing children and spouses that is not susceptible to the order of individuals and families in a file (ideal solution)