View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
19266Bug reportsSurvey editingpublic2023-11-28 16:38
Reportermferraz Assigned Totibor.pacalat  
PrioritynoneSeveritypartial_block 
Status resolvedResolutionfixed 
Summary19266: ArgumentCountError 8 arguments are required, 6 given on closing a survey
Description

Hi

Recently, we had a user report that couldn't close a survey, but as a super admin, I could.
After enabling the debug, we got the following:

ArgumentCountError
8 arguments are required, 6 given
/opt/limesurvey/application/views/surveyAdministration/stopSurvey_view.php(67)
55 </div>
56 </div>
57 </div>
58 <div class="col-12 col-sm-6 col-xl-5">
59 <div class="card card-primary h-100">
60 <div class="card-header ">
61 <i class="ri-stop-fill text-danger fs-4"></i>
62 <h5 class="card-title text-danger"><?php eT("Deactivation"); ?></h5>
63 </div>
64 <div class="card-body px-0 d-flex">
65 <ul>
66 <li><?php printf(gT('Responses are %sno longer accessible.%s Your response table will be renamed to: %s%s%s'),
67 '<b>', '</b><br>','<b>', $sNewSurveyTableName,'</b>'); ?></li>
68 <li><?php printf(gT("All %sparticipant information will be lost%s."), '<b>', '</b>'); ?></li>
69 <li><?php printf(gT("%sCannot%s be %saccessed%s by %sparticipants%s. A message will be displayed stating that the survey has been closed."),
70 '<b>', '</b>','<b>', '</b>', '<b>', '</b>'); ?></li>
71 <li><?php printf(
72 gT(
73 "%sQuestions%s, %sgroups%s and %ssettings%s can be %sedited%s again."),
74 '<b>', '</b>','<b>', '</b>', '<b>', '</b>', '<b>', '</b>'
75 ); ?></li>
76 <p class="mt-4">
77 <?php et('Important: Export your responses before deactivating your survey.') ?>
78 <a href='<?php echo $this->createUrl('admin/export/sa/exportresults/surveyid/' . $surveyid) ?>'>
79 <?php eT("See details.") ?>
Stack Trace
#0

/opt/limesurvey/application/views/surveyAdministration/stopSurveyview.php(67): printf("As %s respostas %s ficaram %sinacessíveis %s. %sA tabela de res...", "<b>", "</b><br>", "<b>", ...)
62 <h5 class="card-title text-danger"><?php eT("Deactivation"); ?></h5>
63 </div>
64 <div class="card-body px-0 d-flex">
65 <ul>
66 <li><?php printf(gT('Responses are %sno longer accessible.%s Your response table will be renamed to: %s%s%s'),
67 '<b>', '</b><br>','<b>', $sNewSurveyTableName,'</b>'); ?></li>
68 <li><?php printf(gT("All %sparticipant information will be lost%s."), '<b>', '</b>'); ?></li>
69 <li><?php printf(gT("%sCannot%s be %saccessed%s by %sparticipants%s. A message will be displayed stating that the survey has been closed."),
70 '<b>', '</b>','<b>', '</b>', '<b>', '</b>'); ?></li>
71 <li><?php printf(
72 gT(
#1
+
/opt/limesurvey/vendor/yiisoft/yii/framework/web/CBaseController.php(126): require("/opt/limesurvey/application/views/surveyAdministration/stopSurve...")
#2
+
/opt/limesurvey/vendor/yiisoft/yii/framework/web/CBaseController.php(95): CBaseController->renderInternal("/opt/limesurvey/application/views/surveyAdministration/stopSurve...", array("surveyid" => 251965, "dbprefix" => "lime
", "date" => "20231122154836", "sNewSurveyTableName" => "lime_old_survey_25196520231122154836"), true)
#3
+
/opt/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(872): CBaseController->renderFile("/opt/limesurvey/application/views/surveyAdministration/stopSurve...", array("surveyid" => 251965, "dbprefix" => "lime
", "date" => "20231122154836", "sNewSurveyTableName" => "lime_old_survey_251965_20231122154836"), true)
#4

/opt/limesurvey/application/views/surveyAdministration/deactivateSurvey_view.php(6): CController->renderPartial("stopSurveyview", array("surveyid" => 251965, "dbprefix" => "lime", "date" => "20231122154836", "sNewSurveyTableName" => "lime_old_survey_251965_20231122154836"))
01
02 <div class='side-body <?php echo getSideBodyClass(false); ?>'>
03 <?php if (isset($step1)) {
04
05 $this->renderPartial('stopSurvey_view', [
06 'surveyid' => $surveyid,
07 'dbprefix' => $dbprefix,
08 'date' => $date,
09 'sNewSurveyTableName' => $sNewSurveyTableName ?? null
10 ]);
11 } elseif (isset($nostep)) { //todo: why no step? at least a message would be nice...?>

Steps To Reproduce

Steps to reproduce

Create a survey and close it with a standard user.

Expected result

survey to close

Actual result

error 500

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)6.3.6+231120
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgreSQL 13+225
Server OS (if known)
Webserver software & version (if known)
PHP Version8.1

Relationships

related to 19238 resolvedtibor.pacalat unable to stop the questionnaire 

Users monitoring this issue

There are no users monitoring this issue.

Activities

tibor.pacalat

tibor.pacalat

2023-11-22 17:18

administrator   ~78653

Which language for the admin interface does the user in question use? We had a similar issue reported today, I just linked it to this ticket.

mferraz

mferraz

2023-11-22 17:24

reporter   ~78654

Thank you for your quick reply.

It's portuguese

tibor.pacalat

tibor.pacalat

2023-11-23 16:15

administrator   ~78682

The issue was in translation string, should be fixed soon.

tibor.pacalat

tibor.pacalat

2023-11-28 16:38

administrator   ~78780

This has been fixed, I tested it on my cloud instance.

Issue History

Date Modified Username Field Change
2023-11-22 17:04 mferraz New Issue
2023-11-22 17:16 tibor.pacalat Relationship added related to 19238
2023-11-22 17:18 tibor.pacalat Note Added: 78653
2023-11-22 17:18 tibor.pacalat Bug heat 0 => 2
2023-11-22 17:18 tibor.pacalat Assigned To => tibor.pacalat
2023-11-22 17:18 tibor.pacalat Status new => feedback
2023-11-22 17:24 mferraz Note Added: 78654
2023-11-22 17:24 mferraz Bug heat 2 => 4
2023-11-22 17:24 mferraz Status feedback => assigned
2023-11-23 16:15 tibor.pacalat Note Added: 78682
2023-11-28 16:38 tibor.pacalat Status assigned => resolved
2023-11-28 16:38 tibor.pacalat Resolution open => fixed
2023-11-28 16:38 tibor.pacalat Note Added: 78780