Generate Sitemap File error

Nick Veit
  • Nick Veit

    Nick Veit - 2011-10-01

    I think I have a data error as my sitemap file contains the following. I have access to the data tables if someone can tell me what to investigate and change.

    <?xml version='1.0' encoding='UTF-8'?>
    <?xml-stylesheet type="text/xsl" href=""?>
    <urlset xmlns=""

    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE: General error: 1366 Incorrect integer value: 'outfile.ged' for column 'gedcom_id' at row 1' in C:\Inetpub\family\PhpGedView\includes\classes\class_pgv_db.php:835
    Stack trace:
    #0 : PDOStatement->execute(Array)
    #1 C:\Inetpub\family\PhpGedView\includes\classes\class_pgv_db.php(835): call_user_func_array(Array, Array)
    #2 C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php(2796): PGV_DBStatement->__call('execute', Array)
    #3 C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php(2796): PGV_DBStatement->execute(Array)
    #4 C:\Inetpub\family\PhpGedView\includes\functions\functions_export.php(184): set_user_gedcom_setting('38', 'outfile.ged', 'canedit', 'none')
    #5 C:\Inetpub\family\PhpGedView\modules\sitemap\index.php(89): createTempUser('#SiteMap#', 'visitor', 'outfile.ged')
    #6 C:\Inetpub\family\PhpGedView\module.php(89): require_once('C:\Inetpub\fami…')
    #7 {main}
      thrown in C:\Inetpub\family\PhpGedView\includes\classes\class_pgv_db.php on line 835

  • Gerry Kroll

    Gerry Kroll - 2011-10-02

    You're asking for Help.  Please use the correct forum in future.

    You have uncovered a bug in PGV.

    Please add the following after line 163 in "includes/functions/functions_db.php":

    $gedcomID = get_id_from_gedcom($gedcom);

    Change the


    in original lines 172, 175, 179, 184 of "includes/functions/functions_db.php" to


    Please let us know whether this fixes your problem.

  • Nick Veit

    Nick Veit - 2011-10-02

    I appreciate your response and apologise for using the wrong forum.

    I opened the php file in Dreamweaver (which displays line numbers) but cannot find "$gedcom" any earlier than line 1000 or so. Somehow my line numbers are not coinciding with yours. For info, my "includes/functions/functions_db.php" file (latest version) contains 3107 lines.

    My lines 162 to 166 read:
    case "OBJE":
    PGV_DB::prepare("SELECT MAX(m_media) FROM {$TBLPREFIX}media WHERE m_gedfile=? AND m_media<?")
    ->execute(array($ged_id, $pid))

    My lines 172 to 184 read:

    // Generate a list of alternate initial letters for the indilist and famlist
    function db_collation_alternatives($letter) {

    // Multi-letter collation.
    // e.g. on czech pages, we don't include "CH" under "C"

  • Stephen Arnold

    Stephen Arnold - 2011-10-02

    Don't use Dreamweaver. Use a good text editor (TextWrangler for Macs) or one of the better text editors for a PC/Linux
    Be sure you don't add a BOM when saving.

  • Gerry Kroll

    Gerry Kroll - 2011-10-03

    I sort-of agree with Stephen about the use of Dreamweaver to edit your PHP script.  Any old text editor will do, even Notepad.  Just be sure to save the file as an ASCII file (Notepad calls it "ANSI").  However, if you're comfortable with Dreamweaver, there's no reason to change.

    In my haste to reply to your original post. I inadvertently named the wrong PHP script.  The changes mentioned above should be applied to "includes/functions/functions_export.php".

  • Nick Veit

    Nick Veit - 2011-10-03

    canajun2eh, many thanks for your prompt assistance. All fixed and checked in Google Webmaster tools…very much appreciated.


Log in to post a comment.