For your information, if you want to make GVExport working with current version (4.2.3), you'll need to append this to the file \includes\functions\functions_db.php :
//- GVEXport : get the famlist from the datastore
function get_fam_list() {
global $TBLPREFIX, $DBCOLLATE;
$sql="SELECT DISTINCT 'FAM' AS type, f_id AS xref, f_file AS ged_id, f_gedcom AS gedrec, f_husb, f_wife, f_chil, f_numchil FROM {$TBLPREFIX}name, {$TBLPREFIX}families WHERE n_file=".PGV_GED_ID." AND f_file=n_file AND f_id=n_id AND n_num=0 ORDER BY n_sort {$DBCOLLATE}";
$res=dbquery($sql);
$fams=array();
$rows=PGV_DB::prepare($sql)->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
$fams=Family::getInstance($row);
}
at least it prevents the module to crash and generate a nice .dot file when runing it with "Show all persons" … Since I really don't know/have tools to debug php, that's all I can do. I tried to contact original maintainer with no success.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The "Show all persons" option was always more-or-less buggy, and I left it because I was too lazy to remove it :-) … so, sorry for the confusion.
Please use the "Anyone related to this person:" option (you can add more individuals, not just one), it gives much more usable results.
Anyway, in the next version I will remove the non-working/non-compatible features from the module to avoid such issues in the future.
Regards,
Ferenc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For your information, if you want to make GVExport working with current version (4.2.3), you'll need to append this to the file \includes\functions\functions_db.php :
//- GVEXport : get the famlist from the datastore
function get_fam_list() {
global $TBLPREFIX, $DBCOLLATE;
$sql="SELECT DISTINCT 'FAM' AS type, f_id AS xref, f_file AS ged_id, f_gedcom AS gedrec, f_husb, f_wife, f_chil, f_numchil FROM {$TBLPREFIX}name, {$TBLPREFIX}families WHERE n_file=".PGV_GED_ID." AND f_file=n_file AND f_id=n_id AND n_num=0 ORDER BY n_sort {$DBCOLLATE}";
$res=dbquery($sql);
$fams=array();
$rows=PGV_DB::prepare($sql)->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as $row) {
$fams=Family::getInstance($row);
}
usort($fams, array('GedcomRecord', 'Compare'));
return $fams;
}
May be maintainer can comit that for GVExport compatibility ?
Cheers,
Does this work?
FAM records do not have an entry in the pgv_name table. The names of FAM records are generated automatically from the names of the husband/wife.
So, this query will always return zero rows….
at least it prevents the module to crash and generate a nice .dot file when runing it with "Show all persons" … Since I really don't know/have tools to debug php, that's all I can do. I tried to contact original maintainer with no success.
Hi,
The "Show all persons" option was always more-or-less buggy, and I left it because I was too lazy to remove it :-) … so, sorry for the confusion.
Please use the "Anyone related to this person:" option (you can add more individuals, not just one), it gives much more usable results.
Anyway, in the next version I will remove the non-working/non-compatible features from the module to avoid such issues in the future.
Regards,
Ferenc