Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Surnames with apostrophes cause issues in 424

Help
2012-01-17
2013-05-30
  • Eoin OSullivan
    Eoin OSullivan
    2012-01-17

    I've been using PhpGedView for several years.
    Following an upgrade to 4.2.4 I am having huge issues with surnames which have apostrophes.
    The website is for O'Sullivans but there are also lots of other irish surnames with the apostrophe which are now getting escaped with the backslash character.
    O'Sullivan is being saved as O\'Sullivan etc.
    It causes problems as everytime you edit an Individual it will continue to append backslashes.  It also affects Notes and the User Admin functions.
    This issue did not affect earlier versions of PhpGedView so I am wondering is there a simple patch/fix or how can I resolve?
    Any tips or suggestions welcome.
    Thanks
    Eoin

     
  • Gerry Kroll
    Gerry Kroll
    2012-01-17

    I have just tried the Edit Name procedure on my 4.3.0 installation, and it works correctly.

    You should upgrade to version 4.3.0 (the "SVN" version).  The download and installation/upgrade instructions are in a recent Help topic post whose title begins with "Repost: ".

    These instructions tell you to export the database to a GEDCOM and then re-import the GEDCOM after the upgrade has been done.  This won't be necessary when upgrading from 4.2.4 to 4.3.0.  There were no database table changes between these two versions.

    If this doesn't fix your problem, you need to look at the PHP configuration on the server.  Do this while signed in as admin in PhpGedView.  Click on the "PHP Info" link near the top right of the Admin menu.  Search for the "magic_" options.  On my site, which works properly, "magic_quotes_GPC" is "on", and the others are all off.

    I seem to recall that there was a change in PGV version 4.3.0 that dealt with how the "magic_quotes_GPC" option is handled.  There was a PHP version dependency that was incorrectly implemented.  This error affected not only names containing apostrophes but also any Note text or even place names.  Quotation marks were equally incorrectly handled.

    Unfortunately, there's no easy way to correct names that were handled incorrectly.  I'd export the database to a GEDCOM, download that GEDCOM, use a text editor to do a bulk correction of those incorrect apostrophes and quotation marks, and then upload and re-import the modified GEDCOM. 

    I'd hazard a guess that there should be no legitimate backslashes in your file, so get rid of backslashes first, and then replace all occurrences of double apostrophes with single ones.  Ditto for quotation marks.  You will probably have to repeat the doubles replacement a few times to catch them all.