View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05047 | Bug reports | Security | public | 2011-03-23 06:19 | 2011-04-11 11:30 |
Reporter | medicnick | Assigned To | c_schmitz | ||
Priority | urgent | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.91RC5 | ||||
Fixed in Version | 1.91RC6 | ||||
Summary | 05047: GSOC: Survey permissions | ||||
Description | This error continues on the current SVN version. When attempting to access Survey Permissions from the admin menu of a survey, the following error is returned (and has for several versions now): [Microsoft][ODBC SQL Server Driver][SQL Server]Ambiguous column name 'uid'.:SELECT p.*, u.users_name, u.full_name FROM [XXXX_survey_permissions] AS p INNER JOIN [XXXX_users] AS u ON p.uid = u.uid WHERE p.sid = 47847 AND u.uid != 1 group by uid, users_name, full_name ORDER BY u.users_name | ||||
Steps To Reproduce | Described above. | ||||
Tags | No tags attached. | ||||
Attached Files | 05047-stable.patch (648 bytes)
Index: html.php =================================================================== --- html.php (revision 9914) +++ html.php (working copy) @@ -1724,7 +1724,7 @@ $query2 = "SELECT p.*, u.users_name, u.full_name FROM ".db_table_name('survey_permissions')." AS p INNER JOIN ".db_table_name('users')." AS u ON p.uid = u.uid WHERE p.sid = {$surveyid} AND u.uid != ".$_SESSION['loginID'] ." - group by uid, users_name, full_name + GROUP BY u.uid, u.users_name, u.full_name ORDER BY u.users_name"; $result2 = db_execute_assoc($query2); //Checked | ||||
Bug heat | 262 | ||||
Complete LimeSurvey version number (& build) | 9906 | ||||
I will donate to the project if issue is resolved | Yes | ||||
Browser | IE8 and Chrome | ||||
Database type & version | MSSQL 2008R2 | ||||
Server OS (if known) | Windows NT WEB708 6.0 build 6002 | ||||
Webserver software & version (if known) | IIS7 | ||||
PHP Version | 5.2.5 | ||||
I don't have MSSQL and it isn't reproducible with MYSQL but my guess is that the fact that the "group by" fields are missing their aliases is causing the error. Please find my patch attached. |
|
Please see the 2html file I just uploaded. Your patch did not work so I revised the code directly in SSMS to get it to work, which this code did work. It has been a while since I have last seen the permissions page and it is much different now. I am not sure if this is returning the right things in the right order but the page is now working. Perhaps you could give it a try in MySQL and then revise again to get it to return what is needed? Thanks! |
|
medicnick: thanks for the patch! Works like a charm ;) |
|
1.91RC6 released. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-23 06:19 | medicnick | New Issue | |
2011-03-26 11:49 | c_schmitz | Assigned To | => c_schmitz |
2011-03-26 11:49 | c_schmitz | Status | new => assigned |
2011-03-26 17:45 | Mazi | Summary | Survey permissions => GSOC: Survey permissions |
2011-03-27 21:45 | pasmaill | Note Added: 14565 | |
2011-03-27 21:45 | pasmaill | File Added: 05047-stable.patch | |
2011-03-28 00:28 | medicnick | File Added: 2html.zip | |
2011-03-28 00:30 | medicnick | Note Added: 14568 | |
2011-03-29 19:43 | c_schmitz | Note Added: 14604 | |
2011-03-29 19:43 | c_schmitz | Status | assigned => resolved |
2011-03-29 19:43 | c_schmitz | Fixed in Version | => 1.91RC6 |
2011-03-29 19:43 | c_schmitz | Resolution | open => fixed |
2011-04-04 11:57 | c_schmitz | Relationship added | has duplicate 05056 |
2011-04-11 11:30 | c_schmitz | Note Added: 14755 | |
2011-04-11 11:30 | c_schmitz | Status | resolved => closed |