View Issue Details

This bug affects 1 person(s).
 262
IDProjectCategoryView StatusLast Update
05047Bug reportsSecuritypublic2011-04-11 11:30
Reportermedicnick Assigned Toc_schmitz  
PriorityurgentSeveritypartial_block 
Status closedResolutionfixed 
Product Version1.91RC5 
Fixed in Version1.91RC6 
Summary05047: 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.

TagsNo 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
 
05047-stable.patch (648 bytes)   
2html.zip (19,036 bytes)
Bug heat262
Complete LimeSurvey version number (& build)9906
I will donate to the project if issue is resolvedYes
BrowserIE8 and Chrome
Database type & versionMSSQL 2008R2
Server OS (if known)Windows NT WEB708 6.0 build 6002
Webserver software & version (if known)IIS7
PHP Version5.2.5

Relationships

has duplicate 05056 closedc_schmitz GSOC: Postgres incompatibility in /admin/admin.php?action=surveysecurity 

Users monitoring this issue

There are no users monitoring this issue.

Activities

pasmaill

pasmaill

2011-03-27 21:45

reporter   ~14565

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.

medicnick

medicnick

2011-03-28 00:30

reporter   ~14568

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!

c_schmitz

c_schmitz

2011-03-29 19:43

administrator   ~14604

medicnick: thanks for the patch! Works like a charm ;)

c_schmitz

c_schmitz

2011-04-11 11:30

administrator   ~14755

1.91RC6 released.

Issue History

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