Postgresql doesn't like double quoths in query strings:

# Query failed: ERROR: column "user/8" does not exist LINE 4: WHERE src = "user/8"; ^ in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/8"; in /usr/share/drupal6/releases/releases/20090122103546/modules/cmf/cmf.module on line 749.

Here's a patch that needs review and test in mysql:

-- cmf/cmf.module      2008-12-03 19:43:45.000000000 +0100
+++ cmf_new/cmf.module  2009-01-26 10:47:37.000000000 +0100
@@ -741,10 +741,10 @@
  */
 function _cmf_get_user_path($uid) {

-  return db_result(db_query('
+  return db_result(db_query("
     SELECT dst
     FROM {url_alias}
-    WHERE src = "%s";',
+    WHERE src = '%s';",
     'user/'. $uid
   ));
 }

Comments

grub3’s picture

I confirm that this patch should be applied ASAP. PostgreSQL does not allow double-quotes. Please apply.

grub3’s picture

Before applying the patch, the error is:

# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/424 » n'existe pas LINE 4: WHERE src = "user/424"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/424"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/932 » n'existe pas LINE 4: WHERE src = "user/932"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/932"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/4485 » n'existe pas LINE 4: WHERE src = "user/4485"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/4485"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/424 » n'existe pas LINE 4: WHERE src = "user/424"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/424"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/1888 » n'existe pas LINE 4: WHERE src = "user/1888"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/1888"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/4352 » n'existe pas LINE 4: WHERE src = "user/4352"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/4352"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/1 » n'existe pas LINE 4: WHERE src = "user/1"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.
# user warning: query: SELECT dst FROM url_alias WHERE src = "user/1"; in /home/html/test/sites/all/modules/cmf/cmf.module on line 749.
# warning: pg_query() [function.pg-query]: Query failed: ERREUR: la colonne « user/3160 » n'existe pas LINE 4: WHERE src = "user/3160"; ^ in /home/html/test/includes/database.pgsql.inc on line 139.

Applying the patch fixes the problem.

grub3’s picture

Status: Needs review » Reviewed & tested by the community

Patch tested by the community.

nunoveloso’s picture

Status: Reviewed & tested by the community » Fixed

Hello! Sorry for being away but I have been very very busy lately.

This issue is fixed on stable version 1.6.

Thank you.

grub3’s picture

Cool, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.