Closed (fixed)
Project:
Content Management Filter
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2009 at 10:01 UTC
Updated:
27 Mar 2009 at 08:40 UTC
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
Comment #1
grub3 commentedI confirm that this patch should be applied ASAP. PostgreSQL does not allow double-quotes. Please apply.
Comment #2
grub3 commentedBefore applying the patch, the error is:
Applying the patch fixes the problem.
Comment #3
grub3 commentedPatch tested by the community.
Comment #4
nunoveloso commentedHello! Sorry for being away but I have been very very busy lately.
This issue is fixed on stable version 1.6.
Thank you.
Comment #5
grub3 commentedCool, thanks.