Needs review
Project:
Family Tree
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Mar 2009 at 19:06 UTC
Updated:
31 Aug 2010 at 00:32 UTC
Jump to comment: Most recent file
I'm running Drupal 6.10 with latest versions of Family Tree 2, Views, and Token. Importing a GEDCOM at most produces an empty individual node. I have tried different character encodings to no avail. One of the files that I was working with is attached.
Typical output:
* Deleted 0 family_individual nodes.
* Deleted 0 family_group nodes.
* Deleted 0 family_location nodes.
* Processed 2 records (10 lines) of GED.
* No more records to process
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | family-tree-import-405170-6.patch | 26.06 KB | edfaught |
| #8 | family-tree-import-405170-8.patch | 31.17 KB | edfaught |
| #4 | Test.ged_.txt | 1.3 KB | edfaught |
| #1 | kennedy-win.ged_.zip | 11.45 KB | JimV |
| kennedy-win.ged_.zip | 0 bytes | JimV |
Comments
Comment #1
JimV commentedComment #2
JimV commentedComment #3
sugardave commentedI've seen this, as well. You'll find that the more records you have, it will process some, but usually leave the last INDI (and FAM, I think) blank for some reason.
I'm working on a fix for this, and early results are promising.
Comment #4
edfaught commentedSame problem, also records that do import are confused.
http://test.vfwpost3894.org/family
Comment #5
edfaught commentedFound a few logic errors in the import code so I'll be working on it. Basically reads the next record before saving the current one. Anyone else looking at this?
Comment #6
edfaught commentedComment #7
edfaught commentedThis patch has been superseded. See comment #8
This is a fairly large change to the import.inc file but it works better for me than the older version. It is still under development and does not read all the available tags in the GEDCOM 5.5 Standard. The working concept is to associate a particular GEDCOM primitive function with each tag within an array, then to navigate the array using the GEDCOM input file with a recursive function that drills down (up?) to each GEDCOM level. Please don't consider using this patch for a production site unless you are willing to accept the shortcomings. Also note that YOUR ENTIRE FAMILY TREE WILL BE DELETED if you check the "Replace existing GED data" checkbox. (Default)
Comment #8
edfaught commentedHere is a more complete patch for importing GEDCOM file data. Not all the standard tags are imported but mostly it is because the family tree nodes have no specific properties to store them in. I've done a sort of hack on the header tag, for example, storing an unprocessed list of information from the header into the family node's revision log property. It is not very elegant but it gives those nodes that are imported some kind of history that they came from a gedcom file. The cross references are read into a temporary array, rather than a database table, so that you may no longer split up the gedcom file into smaller chunks. I had a little trouble importing a file containing over 1500 records, but no problem at all at 500 records. Notes at the individual level are properly imported to the node body along with one or two more tags like burial place. I decided that this practice would make the data more difficult to export later so there are only a couple. Also gedcom repositories are placed into location nodes.
Comment #9
elichac commentedThanks for the patch, it really solves many issues I had with importing GEDCOM data.
However, there is a problem with family_NAME_PERSONAL function.
This is the format in my GEDCOM data.
1 NAME FIRST MID/LAST/
This is the result in the db after import.
title_format = MID/LAST, FIRST - YEAR
firstname = FIRST
middlename = (empty)
lastname = MID/LAST
Also, divorce data is not imported. Looks like adding the following item in family_define_ged_structures() should do it ?
'DIV' => array('primitive' => array('family_event_prefix', 'DIVprefix'),
'substruct' => 'FAMILY_EVENT_STRUCTURE'),
Thanks again.
Comment #10
edfaught commentedYour fix for the divorce data looks like it should work fine. Sorry for the oversight. If you've been perusing the import code you'll see the comment I left in the personal name function. I worked out a fix for you, but it might be quicker to simply edit your gedcom file and insert a space just before the first slash to separate the surname from the middle name.