View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
17865Bug reportsQuestion editorpublic2022-02-03 16:20
ReporterJacq1212 Assigned Toollehar  
PrioritynoneSeverityblock 
Status closedResolutionno change required 
Product Version5.2.x 
Summary17865: Cannot add questions to new survey
Description

I have just installed from zero the app using the helm chart.
No errors noticed in the process and everything seems to be functional except when adding a question to a new survey.

Steps To Reproduce

Steps to reproduce

  1. creates new survey => ok
  2. edit question => save ok
  3. add new question => save Exception

Expected result

I can and new questionns

Actual result

Exception thrown:

Exception
Found no L10n object

/var/www/html/application/controllers/QuestionAdministrationController.php(2598)

2586 @todo document me
2587

2588 @param Question $oQuestion
2589
@param array $dataSet
2590 @return boolean
2591
@throws CHttpException
2592 /
2593 private function applyL10n($oQuestion, $dataSet)
2594 {
2595 foreach ($dataSet as $sLanguage => $aI10NBlock) {
2596 $i10N = QuestionL10n::model()->findByAttributes(['qid' => $oQuestion->qid, 'language' => $sLanguage]);
2597 if (empty($i10N)) {
2598 throw new Exception('Found no L10n object');
2599 }
2600 $i10N->setAttributes(
2601 [
2602 'question' => $aI10NBlock['question'],
2603 'help' => $aI10NBlock['help'],
2604 'script' => isset($aI10NBlock['script']) ? $aI10NBlock['script'] : ''
2605 ],
2606 false
2607 );
2608 if (!$i10N->save()) {
2609 throw new CHttpException(500, gT("Could not store translation"));
2610 }
Stack Trace
#0
– /var/www/html/application/controllers/QuestionAdministrationController.php(426): QuestionAdministrationController->applyL10n()
421 }
422
423 // Apply the changes to general settings, advanced settings and translations
424 $setApplied = [];
425
426 $setApplied['questionI10N'] = $this->applyL10n($question, $questionData['questionI10N']);
427
428 $setApplied['advancedSettings'] = $this->unparseAndSetAdvancedOptions(
429 $question,
430 $questionData['advancedSettings']
431 );
#1
– /var/www/html/framework/web/actions/CInlineAction.php(49): QuestionAdministrationController->actionSaveQuestionData()
44 $controller=$this->getController();
45 $method=new ReflectionMethod($controller, $methodName);
46 if($method->getNumberOfParameters()>0)
47 return $this->runWithParamsInternal($controller, $method, $params);
48
49 $controller->$methodName();
50 return true;
51 }
52 }
#2
– /var/www/html/framework/web/CController.php(308): CInlineAction->runWithParams()
303 {
304 $priorAction=$this->_action;
305 $this->_action=$action;
306 if($this->beforeAction($action))
307 {
308 if($action->runWithParams($this->getActionParams())===false)
309 $this->invalidActionParams($action);
310 else
311 $this->afterAction($action);
312 }
313 $this->_action=$priorAction;
#3
– /var/www/html/framework/web/CController.php(286): CController->runAction()
281
@see runAction
282 */
283 public function runActionWithFilters($action,$filters)
284 {
285 if(empty($filters))
286 $this->runAction($action);
287 else
288 {
289 $priorAction=$this->_action;
290 $this->_action=$action;
291 CFilterChain::create($this,$action,$filters)->run();
#4
– /var/www/html/framework/web/CController.php(265): CController->runActionWithFilters()
260 {
261 if(($parent=$this->getModule())===null)
262 $parent=Yii::app();
263 if($parent->beforeControllerAction($this,$action))
264 {
265 $this->runActionWithFilters($action,$this->filters());
266 $parent->afterControllerAction($this,$action);
267 }
268 }
269 else
270 $this->missingAction($actionID);
#5
– /var/www/html/application/controllers/LSBaseController.php(160): CController->run()
155 $this->redirect(array('/admin/authentication/sa/login'));
156 }
157 }
158 }
159
160 parent::run($action);
161 }
162
163 /
164 Load and set session vars
165

#6
– /var/www/html/framework/web/CWebApplication.php(282): LSBaseController->run()
277 {
278 list($controller,$actionID)=$ca;
279 $oldController=$this->_controller;
280 $this->_controller=$controller;
281 $controller->init();
282 $controller->run($actionID);
283 $this->_controller=$oldController;
284 }
285 else
286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
287 array('{route}'=>$route===''?$this->defaultController:$route)));
#7
– /var/www/html/framework/web/CWebApplication.php(141): CWebApplication->runController()
136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
137 $_GET[$name]=$value;
138 }
139 else
140 $route=$this->getUrlManager()->parseUrl($this->getRequest());
141 $this->runController($route);
142 }
143
144 /

145 Registers the core application components.
146
This method overrides the parent implementation by registering additional core components.
#8
– /var/www/html/framework/base/CApplication.php(185): CWebApplication->processRequest()
180 public function run()
181 {
182 if($this->hasEventHandler('onBeginRequest'))
183 $this->onBeginRequest(new CEvent($this));
184 register_shutdown_function(array($this,'end'),0,false);
185 $this->processRequest();
186 if($this->hasEventHandler('onEndRequest'))
187 $this->onEndRequest(new CEvent($this));
188 }
189
190 /*
#9
– /var/www/html/index.php(192): CApplication->run()
187 require_once APPPATH . 'core/LSYii_Application' . EXT;
188
189 $config = require_once(APPPATH . 'config/internal' . EXT);
190
191 Yii::$enableIncludePath = false;
192 Yii::createApplication('LSYii_Application', $config)->run();
193
194 /
End of file index.php /
195 /
Location: ./index.php */
2022-02-03 10:58:49 Apache/2.4.52 (Debian) Yii Framework/1.1.24-dev

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.2.11+220124
I will donate to the project if issue is resolvedNo
Browser
Database type & version10.5.10-MariaDB-1:10.5.10+maria~focal-log
Server OS (if known)
Webserver software & version (if known)
PHP Version8.0.15

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2022-02-03 12:19

administrator   ~68188

Where did you get the install package from? Our community download page?

Jacq1212

Jacq1212

2022-02-03 13:26

reporter   ~68189

Used this helm chart: https://github.com/martialblog/helm-charts
That uses this image: https://github.com/martialblog/docker-limesurvey

ollehar

ollehar

2022-02-03 13:37

administrator   ~68190

Report it at their github, it's not an official image.

Or use this: https://community.limesurvey.org/downloads/

ollehar

ollehar

2022-02-03 13:37

administrator   ~68191

Not our Docker image.

Jacq1212

Jacq1212

2022-02-03 13:39

reporter   ~68192

Added gif showing the processes.

I noticed also that in the Save post sent to the server the question[qid] is set to 0 which makes no sense, form data:

sid: 864537
question[qid]: 0
tabOverviewEditor: editor
savecreate: Enviar
question[title]: G01Q02
questionTypeSelector: T
questionTypeVisual:
question[type]: T
question[question_theme_name]: longfreetext
questionI10N[en][question]:
questionI10N[en][help]:
question[gid]: 25
question[mandatory]: N
question[relevance]: 1
question[encrypted]: N
question[preg]:
question[save_as_default]: Y
advancedSettings[logic][random_group]:
advancedSettings[logic][em_validation_q]:
advancedSettings[logic][em_validation_q_tip][en]:
advancedSettings[display][hide_tip]: 0
advancedSettings[display][text_input_width]:
advancedSettings[display][input_size]:
advancedSettings[display][display_rows]:
advancedSettings[display][hidden]: 0
advancedSettings[display][cssclass]:
advancedSettings[input][maximum_chars]:
advancedSettings[other][page_break]: 0
advancedSettings[timer][time_limit]:
advancedSettings[timer][time_limit_action]: 1
advancedSettings[timer][time_limit_disable_next]: 0
advancedSettings[timer][time_limit_disable_prev]: 0
advancedSettings[timer][time_limit_countdown_message][en]:
advancedSettings[timer][time_limit_timer_style]:
advancedSettings[timer][time_limit_message_delay]:
advancedSettings[timer][time_limit_message][en]:
advancedSettings[timer][time_limit_message_style]:
advancedSettings[timer][time_limit_warning]:
advancedSettings[timer][time_limit_warning_display_time]:
advancedSettings[timer][time_limit_warning_message][en]:
advancedSettings[timer][time_limit_warning_style]:
advancedSettings[timer][time_limit_warning_2]:
advancedSettings[timer][time_limit_warning_2_display_time]:
advancedSettings[timer][time_limit_warning_2_message][en]:
advancedSettings[timer][time_limit_warning_2_style]:
advancedSettings[statistics][statistics_showgraph]: 1
advancedSettings[statistics][statistics_graphtype]: 0
bFullPOST: 1

The lime_question_l10ns table contents are:
id,qid,question,help,script,language
193,166,asdfasdfasdfasdf,This is a question help text.,,en

Jacq1212

Jacq1212

2022-02-03 13:45

reporter   ~68193

Added missing gif blocked due to big size

chrome_U3DxWjDvsi.rar (2,041,324 bytes)
Jacq1212

Jacq1212

2022-02-03 13:49

reporter   ~68194

Sorry to ask again but I could not find an official image, where is your Docker image?
Thanks!

Jacq1212

Jacq1212

2022-02-03 16:18

reporter   ~68195

Hi again, just to inform others with a similar issue.
I was testing the app in a galera mariadb cluster which has the known limitation o read-after-write:
https://galeracluster.com/2015/06/achieving-read-after-write-semantics-with-galera/#:~:text=It%20allows%20achieving%20truly%20read,been%20applied%20on%20the%20node.

Adding a question to an existing group is affected from this read-after write in the lime_question_I10ns table, this only affects galera mariadb clusters, single node mariadb nodes are not affected:

The exception thrown is caused because the previous write operation of the I10ns question data has not yet beeing synced so the read find an empty result.

The workaround for galera scenarios is to use the mentioned "SET SESSION wsrep_sync_wait = 1" in the init connection attribute to force causal waits, this can be set in the DB connection attributes parameter Yii framework.

ollehar

ollehar

2022-02-03 16:19

administrator   ~68196

We don't have an official docker image. We offer ComfortUpdate as an easy way to update your installation instead.

ollehar

ollehar

2022-02-03 16:20

administrator   ~68197

Feel free to add your debug information on our forum!

Issue History

Date Modified Username Field Change
2022-02-03 12:11 Jacq1212 New Issue
2022-02-03 12:19 ollehar Note Added: 68188
2022-02-03 12:19 ollehar Bug heat 0 => 2
2022-02-03 12:19 ollehar Assigned To => ollehar
2022-02-03 12:19 ollehar Status new => feedback
2022-02-03 13:26 Jacq1212 Note Added: 68189
2022-02-03 13:26 Jacq1212 Bug heat 2 => 4
2022-02-03 13:26 Jacq1212 Status feedback => assigned
2022-02-03 13:37 ollehar Note Added: 68190
2022-02-03 13:37 ollehar Status assigned => closed
2022-02-03 13:37 ollehar Resolution open => no change required
2022-02-03 13:37 ollehar Note Added: 68191
2022-02-03 13:39 Jacq1212 Note Added: 68192
2022-02-03 13:45 Jacq1212 Note Added: 68193
2022-02-03 13:45 Jacq1212 File Added: chrome_U3DxWjDvsi.rar
2022-02-03 13:49 Jacq1212 Note Added: 68194
2022-02-03 16:18 Jacq1212 Note Added: 68195
2022-02-03 16:19 ollehar Note Added: 68196
2022-02-03 16:20 ollehar Note Added: 68197