I've iinstalled modulle DOTGO Authentication Module (indeed with DOtgo module)
during installation i had a message:
user warning: Unknown column 'd612_token' in 'field list' query: SELECT d612_token FROM d612_dotgo_auth WHERE uid=1 in /var/www/*/sites/all/modules/dotgo/dotgo_auth.module on line 100.
d612 - table prefix for my installation of Drupal 6.12
and after that looked into code for dotgo_auth.module:
function _get_token($uid) {
<b>$token = db_result(db_query("SELECT {token} FROM {dotgo_auth} WHERE uid=%d", $uid));</b>
if (!$token) $token = _set_token($uid);
return $token;
}
and in database.mysql-common.inc:
function db_query($query) {
$args = func_get_args();
array_shift($args);
<b> $query = db_prefix_tables($query);</b>
....
SO in place around $query = db_prefix_tables($query); I've put debug to show queries. So here is results:
SELECT {token} FROM {dotgo_auth} WHERE uid=%d - before
SELECT d612_token FROM d612_dotgo_auth WHERE uid=%d - after
And that is why field is unknown....!!!!
In table d612_dotgo_auth data is existed (SELECT token FROM d612_dotgo_auth WHERE uid=1):
1 ixwzpe
1 YZn6a3
1 zoWJEH
I also have message "You do not have the PHP "dom" extension loaded, this module will not function."
Could it be related with?
or it is really issue with table prefixes?
Is it Drupal originally issue with db_prefix_tables function?
or with dotgo module way of calling this function?
Comments
Comment #1
landike commentedComment #2
damien tournoud commentedThis issue has nothing to do with Drupal core. Reassigning.
Comment #3
chrisfromredfinI think this is my fault. I think I'm not supposed to be curly-bracing the columns, just the tables... so:
$token = db_result(db_query("SELECT {token} FROM {dotgo_auth} WHERE uid=%d", $uid));
should become:
$token = db_result(db_query("SELECT token FROM {dotgo_auth} WHERE uid=%d", $uid));
... that should make it work for you; I'm just about to go on vacation for the weekend but I will try and patch this ASAP.
Comment #4
landike commentedthe same is in 63 line: - function dotgo_auth:
$uid = db_result(db_query("SELECT {uid} FROM {dotgo_auth} WHERE {token} = '%s'", $sys_argument));
it will be mistake too.
Need to reseacrh other files.
Please fix it ASAP.
Thanks.
Comment #5
chrisfromredfinLAN_DRUPAL_aka_landike_aka_empirius - please test. I just committed the change so it should work with the new version. You'll need to check out from HEAD with CVS or wait until the package roller runs again (for -dev releases it's only every 12 hours I think).