#2890 error autocomplete places

v4.3.0
closed-fixed
Gerry Kroll
None
5
2013-04-16
2012-05-15
Hagemeijer
No

I always get an exception when trying to enter a place in the Edit Interface window.
I'm using the latest SVN version 7072. The server PhpGedView is running on is OSX Lion Server, so a Postgresql database is used, version 9.0.4. I only get this error with places, cemeteries drop down ok.

The error code is:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42883]: Undefined function: 7 ERROR: function concat(character varying, unknown, character varying) does not exist
LINE 1: ...nd p1.p_parent_id=0 AND p1.p_file=$2 union select CONCAT(p1....
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.' in /Library/Server/Web/Data/Sites/phpgedview/includes/classes/class_pgv_db.php:835
Stack trace:
#0 [internal function]: PDOStatement->execute(Array)
#1 /Library/Server/Web/Data/Sites/phpgedview/includes/classes/class_pgv_db.php(835): call_user_func_array(Array, Array)
#2 /Library/Server/Web/Data/Sites/phpgedview/includes/functions/functions_db.php(3082): PGV_DBStatement->__call('execute', Array)
#3 /Library/Server/Web/Data/Sites/phpgedview/includes/functions/functions_db.php(3082): PGV_DBStatement->execute(Array)
#4 /Library/Server/Web/Data/Sites/phpgedview/autocomplete.php(503): get_autocomplete_PLA in /Library/Server/Web/Data/Sites/phpgedview/includes/classes/class_pgv_db.php on line 835

Thanks in advance,

Erik Hagemeijer.

Discussion

  • ggpauly
    ggpauly
    2012-05-19

    When did this start? When you upgraded PGV or Postgresql?

     
  • ggpauly
    ggpauly
    2012-05-20

    This looks like an easy fix - the code is already there for sqlite, just need to find what postgres is called in PGV and shunt it over to the sqlite code. It's in includes/functions/functions_db.php at the end of the file.

     
  • ggpauly
    ggpauly
    2012-05-21

    Erik, are you available to test this? Or someone else with postgresql and the latest SVN install of PGV?

     
  • Hagemeijer
    Hagemeijer
    2012-05-23

    I have changed functions_db.php so that pgsql also uses the sqlite code. Now I get no errors, but if I switch off the Geo database I get no results at all.
    Logging is disabled now in Postgres, so I will turn that on and see what queries are generated exactly.

     
  • dyspd
    dyspd
    2013-04-10

    Having hit this problem myself I tried to get this working by ensuring the sqlite code was being called, however as above places does not work as pgsql LIKE statement is case sensitive, hacking the code to use iLIKE for pgsql does however solve the issue.

     
  • Gerry Kroll
    Gerry Kroll
    2013-04-16

    This problem has been fixed in SVN.

    Please can you check that the fix works for you.

    If you agree that the problem is fixed, you should change the bug status to "Closed".

    If you think the problem is not fixed, please provide further information.

    Regards,

    The PGV Team

     
  • Gerry Kroll
    Gerry Kroll
    2013-04-16

    • assigned_to: nobody --> canajun2eh
    • status: open --> closed-fixed
     
  • Gerry Kroll
    Gerry Kroll
    2013-04-16

    Fixed in SVN 7092.

    The updated file "includes/functions/functions_db.php" is available in the Patches section.