View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
04180 | Bug reports | Survey editing | public | 2010-03-05 00:17 | 2010-03-24 10:48 |
Reporter | thone | Assigned To | texens | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.87+ | ||||
Summary | 04180: Add group to a survey | ||||
Description | I have a group of two users. I tried to add this group to a survey, I got result page with "blank" message and no user got added. If I manually added one user in this group, and try to add group, the other user was added successfully. | ||||
Steps To Reproduce | 1) Create a survey using UserA | ||||
Tags | No tags attached. | ||||
Attached Files | html.php.patch (1,796 bytes)
Index: html.php =================================================================== --- html.php (revision 8515) +++ html.php (working copy) @@ -1626,16 +1626,14 @@ { while ($row2 = $result2->FetchRow()) { - $uid_arr[] = $row2['uid']; - $values[] = "($surveyid, {$row2['uid']},0,0,0,0,0,0)"; - } - $values_implode = implode(",", $values); + $uid_arr[] = $row2['uid']; + $isrquery = "INSERT INTO {$dbprefix}surveys_rights VALUES ($surveyid, {$row2['uid']},0,0,0,0,0,0) "; + $isrresult = $connect->Execute($isrquery); //Checked + if (!$isrresult) break; + } - $isrquery = "INSERT INTO {$dbprefix}surveys_rights VALUES ".$values_implode; - $isrresult = $connect->Execute($isrquery); //Checked - - if($isrresult) - { + if($isrresult) + { $addsummary .= "<div class=\"successheader\">".$clang->gT("User Group added.")."</div>\n"; $_SESSION['uids'] = $uid_arr; $addsummary .= "<br /><form method='post' action='$scriptname?sid={$surveyid}'>" @@ -1643,7 +1641,13 @@ ."<input type='hidden' name='action' value='setusergroupsurveysecurity' />" ."<input type='hidden' name='ugid' value='{$postusergroupid}' />" ."</form>\n"; - } + } + else + { + // Error while adding user to the database + $addsummary .= "<div class=\"warningheader\">".$clang->gT("Failed to add User Group.")."</div>\n"; + $addsummary .= "<br/><input type=\"submit\" onclick=\"window.open('$scriptname?action=surveysecurity&sid={$surveyid}', '_top')\" value=\"".$clang->gT("Continue")."\"/>\n"; + } } else { | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 8429 | ||||
I will donate to the project if issue is resolved | |||||
Browser | Chrome | ||||
Database type & version | SQL Server Express 2005 | ||||
Server OS (if known) | Windows XP | ||||
Webserver software & version (if known) | IIS 5.0 | ||||
PHP Version | 5.2.8 | ||||
thone, |
|
If possible also take a look at your servers error log and add the details here. |
|
Hey texens, can you take a look at it? We really need some help at fixing bugs. If there are any questions please ask at our developer IRC. |
|
Hello, |
|
Unable to reproduce the bug. @thone, I'm mentioning the steps that I took while attempting to reproduce the bug. Kindly take a look at it and let me know if your path differs from mine at any step. Step – 1: Logged in as admin, click on edit users, and create user A PS: Logged in as admin, means that the action is performed by the admin. |
|
Thone, can you please provide feedback? Otherwise we have to close this issue. |
|
Thank you all for working on this ticket. Yes, the steps texens are taking are correct way of reproducing the problem on my system. The problem may happen because of I am testing the software on Windows XP and using MS SQL Server Express. I was about to try this on our development server (win 2003) which have 1.80+ installed but my manager told me to put limesurvey upgrade project on hold therefore I cannot do anything further. Please close the ticket at your convenient. Thanks a lot. |
|
texens, did you test this on MSSQL server? |
|
Reminder sent to: texens What is the status on this? |
|
tested it on MS SQL Server Express 2005 and have been able to reproduce the error. |
|
The error was caused because MS SQL server Express 2005 does not support inserting more than one row using only one insert statement of the form : The workaround is |
|
Fix committed to r8512. |
|
Hi texens, although your solution works you are not solving the basic problem. |
|
Fix committed to r8516. Removed the db-specific solution.
|
|
Thanks guys. You guys are awesome! |
|
Thank you, texens! |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2010-03-05 00:17 | thone | New Issue | |
2010-03-05 06:10 | texens | Note Added: 11217 | |
2010-03-05 11:41 | Mazi | Note Added: 11218 | |
2010-03-05 11:41 | Mazi | Assigned To | => Mazi |
2010-03-05 11:41 | Mazi | Status | new => feedback |
2010-03-05 11:46 | Mazi | Status | feedback => assigned |
2010-03-05 11:46 | Mazi | Assigned To | Mazi => texens |
2010-03-05 11:47 | Mazi | Note Added: 11219 | |
2010-03-05 19:21 | thone | Note Added: 11236 | |
2010-03-05 19:35 | thone | File Added: limesurvey_img.gif | |
2010-03-08 18:31 | texens | Note Added: 11253 | |
2010-03-08 18:33 | texens | Note Edited: 11253 | |
2010-03-08 18:34 | texens | Assigned To | texens => |
2010-03-08 18:34 | texens | Assigned To | => texens |
2010-03-08 22:50 | Mazi | Status | assigned => feedback |
2010-03-10 21:37 | texens | Assigned To | texens => |
2010-03-10 21:38 | texens | Status | feedback => assigned |
2010-03-10 21:38 | texens | Assigned To | => texens |
2010-03-10 21:39 | texens | Status | assigned => feedback |
2010-03-15 22:53 | c_schmitz | Note Added: 11377 | |
2010-03-16 01:37 | thone | Note Added: 11382 | |
2010-03-16 01:37 | thone | Status | feedback => assigned |
2010-03-16 01:42 | c_schmitz | Note Added: 11383 | |
2010-03-22 17:56 | c_schmitz | Note Added: 11470 | |
2010-03-23 00:59 | texens | Note Added: 11478 | |
2010-03-23 00:59 | texens | Status | assigned => confirmed |
2010-03-23 01:00 | texens | Status | confirmed => assigned |
2010-03-23 07:48 | texens | File Added: html.php.patch | |
2010-03-23 07:52 | texens | Note Added: 11480 | |
2010-03-23 08:25 | texens | Note Added: 11481 | |
2010-03-23 08:25 | texens | Status | assigned => resolved |
2010-03-23 08:25 | texens | Resolution | open => fixed |
2010-03-23 10:11 | c_schmitz | Note Added: 11482 | |
2010-03-23 10:11 | c_schmitz | Status | resolved => feedback |
2010-03-23 10:11 | c_schmitz | Resolution | fixed => reopened |
2010-03-23 15:58 | texens | File Deleted: html.php.patch | |
2010-03-23 15:59 | texens | File Added: html.php.patch | |
2010-03-23 16:18 | texens | Note Added: 11487 | |
2010-03-23 16:18 | texens | Status | feedback => resolved |
2010-03-23 16:18 | texens | Resolution | reopened => fixed |
2010-03-23 18:01 | thone | Note Added: 11488 | |
2010-03-23 20:23 | c_schmitz | Note Added: 11489 | |
2010-03-24 10:48 | c_schmitz | Status | resolved => closed |
2010-10-25 00:17 | c_schmitz | Category | Survey Design => Survey design |
2019-11-01 17:25 | c_schmitz | Category | Survey design => Survey editing |