Closed (fixed)
Project:
Realname registration
Version:
6.x-2.0-rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2011 at 12:30 UTC
Updated:
15 Sep 2011 at 15:38 UTC
For instance: realname_registration.module, line 556
$firstname = db_result(db_query("
SELECT %s
FROM node AS n
LEFT JOIN content_type_profile AS c
[...]
Should be:
$firstname = db_result(db_query("
SELECT %s
FROM {node} AS n
LEFT JOIN {content_type_profile} AS c
[...]
The SELECT fails with a user warning: "Table 'mydb.node' doesn't exist"
Comments
Comment #1
sgerbino commentedYou are absolutely right, I realized this issue when using shared tables a few days ago. I will be fixing this code at the next chance I get. Thanks for reporting the issue (and solution). I will close the thread after I've committed the fixes.
Comment #2
sgerbino commentedComment #3
tito.brasolin commentedThank you Steve.
In the meanwhile I realized that the profile type is configurable, so this should be a more complete solution (but I haven't thoroughly tested it yet):
[...]
$realname_profile_type = variable_get('realname_profile_type', '');
[...]
$firstname = db_result(db_query("
SELECT {$firstname_field}_value
FROM {node} AS n
LEFT JOIN {content_type_{$realname_profile_type}} AS c
[...]
Comment #4
sgerbino commentedAh, I see I'm going to re-open this issue until I test it out and/or fix it.
Comment #5
sgerbino commentedI just pushed some changes that should resolve the issue, it will stay in the dev branch until I address the other issues in the queue.