- Posts: 11
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
error 404 after updating
- JaimeAvalos
- Topic Author
- Offline
- New Member
Less
More
4 years 2 months ago #192954
by JaimeAvalos
error 404 after updating was created by JaimeAvalos
a survey was running without any problem until we updated from version 3.5.0 (build 180309) to version 3.21.5+200115. Now when a token is introduced the next error appears:
500: Internal Server Error
Call to a member function getErrors() on null
Here are the things that I noticed:
>If I deactivate the survey and activate it again, importing the old answers and tokens, the tokens work correctly the first time, afterwards the same error rises.
>There are some of the tokens that work correctly but there are many that do not.
> If I create a very simple survey with just two input text questions the problem rises when I hit the buttum "submit" at the end of the survey.
>Other older surveys do not show any problem
Here is the html when setting debug mode = 2
Error
Call to a member function getErrors() on null
/var/www/html/<server web address>.com/public_html/application/helpers/expressions/em_manager_helper.php(5585)
5573 {
5574 $aResponseAttributes[$key] = stripCtrlChars($val);
5575 }
5576 }
5577
5578 if (isset($_SESSION[$this->sessid]) && $this->surveyOptions)
5579 {
5580 $oResponse = Response::model($this->sid)->findByPk($_SESSION[$this->sessid]);
5581 //If the responses already have been submitted once they are marked as completed already, so they shouldn't be changed.
5582 if ($oResponse->submitdate == null || Survey::model()->findByPk($this->sid)->alloweditaftercompletion == 'Y') {
5583 $iCountUpdated = Response::model($this->sid)->updateByPk($oResponse->id,$aResponseAttributes);
5584 if (!$iCountUpdated) {
5585 $message = submitfailed('', print_r($response->getErrors())); // $response->getErrors() is array[string[]], then can not join
5586 if (($this->debugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY) {
5587 $message .= CHTml::errorSummary($response,$this->gT('Error on response update')); // Add SQL error according to debugLevel
5588 }
5589 LimeExpressionManager::addFrontendFlashMessage('error', $message, $this->sid);
5590 } else {
5591 // Action in case its saved with success : to be move in Response::aferSave ?
5592 // Save Timings if needed
5593 if ($this->surveyOptions) {
5594 Yii::import("application.libraries.Save");
5595 $cSave = new Save();
5596 $cSave->set_answer_time();
5597 }
Stack Trace
#0
– /var/www/html/<server web address>.com/public_html/application/helpers/expressions/em_manager_helper.php(5799): LimeExpressionManager->_UpdateValuesInDatabase()
5794 }
5795 else
5796 {
5797 // display new group
5798 if(!$preview){ // Save only if not in preview mode
5799 $message .= $LEM->_UpdateValuesInDatabase();
5800 $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
5801 }
5802 $LEM->lastMoveResult = array(
5803 'finished'=>false,
5804 'message'=>$message,
#1
– /var/www/html/<server web address>.com/public_html/application/helpers/SurveyRuntimeHelper.php(817): LimeExpressionManager::JumpTo(0, false, false)
812 // Do it only if needed : we don't need it if we don't have index
813 if (isset($_SESSION[$this->LEMsessid]) && $_SESSION[$this->LEMsessid] > $_SESSION[$this->LEMsessid] && $this->aSurveyInfo) {
814 LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid], false, false);
815 }
816
817 $this->aMoveResult = LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid], false, false); // if late in the survey, will re-validate contents, which may be overkill
818
819 unset($_SESSION[$this->LEMsessid]);
820 } else if (!$this->LEMskipReprocessing) {
821
822 //Move current step ###########################################################################
#2
– /var/www/html/<server web address>.com/public_html/application/helpers/SurveyRuntimeHelper.php(533): SurveyRuntimeHelper->setMoveResult()
528 $this->initFirstStep(); // If it's the first time user load this survey, will init session and LEM
529 $this->initTotalAndMaxSteps();
530 $this->checkIfUseBrowserNav(); // Check if user used browser navigation, or relaoded page
531 if ($this->sMove != 'clearcancel' && $this->sMove != 'confirmquota') {
532 $this->checkPrevStep(); // Check if prev step is set, else set it
533 $this->setMoveResult();
534 $this->checkClearCancel();
535 $this->setPrevStep();
536 $this->checkIfFinished();
537 $this->setStep();
538
#3
+ /var/www/html/<server web address>.com/public_html/application/helpers/SurveyRuntimeHelper.php(105): SurveyRuntimeHelper->initMove()
#4
+ /var/www/html/<server web address>.com/public_html/application/controllers/survey/index.php(590): SurveyRuntimeHelper->run("629575", array("surveyid" => "629575", "thissurvey" => array("htmlemail" => "Y", "format" => "G", "template" => "default", "language" => "en", ...), "thisstep" => 0, "clienttoken" => "diiLiveDE0003", ...))
#5
+ /var/www/html/<server web address>.com/public_html/application/controllers/survey/index.php(24): index->action()
#6
+ /var/www/html/<server web address>.com/public_html/framework/web/actions/CAction.php(76): index->run()
#7
+ /var/www/html/<server web address>.com/public_html/framework/web/CController.php(308): CAction->runWithParams(array("sid" => "629575"))
#8
+ /var/www/html/<server web address>.com/public_html/framework/web/CController.php(286): CController->runAction(index)
#9
+ /var/www/html/<server web address>.com/public_html/framework/web/CController.php(265): CController->runActionWithFilters(index, array())
#10
+ /var/www/html/<server web address>.com/public_html/framework/web/CWebApplication.php(282): CController->run("index")
#11
+ /var/www/html/<server web address>.com/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index/sid/629575")
#12
+ /var/www/html/<server web address>.com/public_html/framework/base/CApplication.php(185): CWebApplication->processRequest()
#13
+ /var/www/html/<server web address>.com/public_html/index.php(194): CApplication->run()
500: Internal Server Error
Call to a member function getErrors() on null
Here are the things that I noticed:
>If I deactivate the survey and activate it again, importing the old answers and tokens, the tokens work correctly the first time, afterwards the same error rises.
>There are some of the tokens that work correctly but there are many that do not.
> If I create a very simple survey with just two input text questions the problem rises when I hit the buttum "submit" at the end of the survey.
>Other older surveys do not show any problem
Here is the html when setting debug mode = 2
Error
Call to a member function getErrors() on null
/var/www/html/<server web address>.com/public_html/application/helpers/expressions/em_manager_helper.php(5585)
5573 {
5574 $aResponseAttributes[$key] = stripCtrlChars($val);
5575 }
5576 }
5577
5578 if (isset($_SESSION[$this->sessid]) && $this->surveyOptions)
5579 {
5580 $oResponse = Response::model($this->sid)->findByPk($_SESSION[$this->sessid]);
5581 //If the responses already have been submitted once they are marked as completed already, so they shouldn't be changed.
5582 if ($oResponse->submitdate == null || Survey::model()->findByPk($this->sid)->alloweditaftercompletion == 'Y') {
5583 $iCountUpdated = Response::model($this->sid)->updateByPk($oResponse->id,$aResponseAttributes);
5584 if (!$iCountUpdated) {
5585 $message = submitfailed('', print_r($response->getErrors())); // $response->getErrors() is array[string[]], then can not join
5586 if (($this->debugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY) {
5587 $message .= CHTml::errorSummary($response,$this->gT('Error on response update')); // Add SQL error according to debugLevel
5588 }
5589 LimeExpressionManager::addFrontendFlashMessage('error', $message, $this->sid);
5590 } else {
5591 // Action in case its saved with success : to be move in Response::aferSave ?
5592 // Save Timings if needed
5593 if ($this->surveyOptions) {
5594 Yii::import("application.libraries.Save");
5595 $cSave = new Save();
5596 $cSave->set_answer_time();
5597 }
Stack Trace
#0
– /var/www/html/<server web address>.com/public_html/application/helpers/expressions/em_manager_helper.php(5799): LimeExpressionManager->_UpdateValuesInDatabase()
5794 }
5795 else
5796 {
5797 // display new group
5798 if(!$preview){ // Save only if not in preview mode
5799 $message .= $LEM->_UpdateValuesInDatabase();
5800 $LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
5801 }
5802 $LEM->lastMoveResult = array(
5803 'finished'=>false,
5804 'message'=>$message,
#1
– /var/www/html/<server web address>.com/public_html/application/helpers/SurveyRuntimeHelper.php(817): LimeExpressionManager::JumpTo(0, false, false)
812 // Do it only if needed : we don't need it if we don't have index
813 if (isset($_SESSION[$this->LEMsessid]) && $_SESSION[$this->LEMsessid] > $_SESSION[$this->LEMsessid] && $this->aSurveyInfo) {
814 LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid], false, false);
815 }
816
817 $this->aMoveResult = LimeExpressionManager::JumpTo($_SESSION[$this->LEMsessid], false, false); // if late in the survey, will re-validate contents, which may be overkill
818
819 unset($_SESSION[$this->LEMsessid]);
820 } else if (!$this->LEMskipReprocessing) {
821
822 //Move current step ###########################################################################
#2
– /var/www/html/<server web address>.com/public_html/application/helpers/SurveyRuntimeHelper.php(533): SurveyRuntimeHelper->setMoveResult()
528 $this->initFirstStep(); // If it's the first time user load this survey, will init session and LEM
529 $this->initTotalAndMaxSteps();
530 $this->checkIfUseBrowserNav(); // Check if user used browser navigation, or relaoded page
531 if ($this->sMove != 'clearcancel' && $this->sMove != 'confirmquota') {
532 $this->checkPrevStep(); // Check if prev step is set, else set it
533 $this->setMoveResult();
534 $this->checkClearCancel();
535 $this->setPrevStep();
536 $this->checkIfFinished();
537 $this->setStep();
538
#3
+ /var/www/html/<server web address>.com/public_html/application/helpers/SurveyRuntimeHelper.php(105): SurveyRuntimeHelper->initMove()
#4
+ /var/www/html/<server web address>.com/public_html/application/controllers/survey/index.php(590): SurveyRuntimeHelper->run("629575", array("surveyid" => "629575", "thissurvey" => array("htmlemail" => "Y", "format" => "G", "template" => "default", "language" => "en", ...), "thisstep" => 0, "clienttoken" => "diiLiveDE0003", ...))
#5
+ /var/www/html/<server web address>.com/public_html/application/controllers/survey/index.php(24): index->action()
#6
+ /var/www/html/<server web address>.com/public_html/framework/web/actions/CAction.php(76): index->run()
#7
+ /var/www/html/<server web address>.com/public_html/framework/web/CController.php(308): CAction->runWithParams(array("sid" => "629575"))
#8
+ /var/www/html/<server web address>.com/public_html/framework/web/CController.php(286): CController->runAction(index)
#9
+ /var/www/html/<server web address>.com/public_html/framework/web/CController.php(265): CController->runActionWithFilters(index, array())
#10
+ /var/www/html/<server web address>.com/public_html/framework/web/CWebApplication.php(282): CController->run("index")
#11
+ /var/www/html/<server web address>.com/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("survey/index/sid/629575")
#12
+ /var/www/html/<server web address>.com/public_html/framework/base/CApplication.php(185): CWebApplication->processRequest()
#13
+ /var/www/html/<server web address>.com/public_html/index.php(194): CApplication->run()
The topic has been locked.
- JaimeAvalos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
4 years 2 months ago #192993
by JaimeAvalos
Replied by JaimeAvalos on topic error 404 after updating
Today was discovered that the error rises every time the survey is closed at a page different than the -1 (the welcome message page).
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
4 years 2 months ago #192999
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic error 404 after updating
I assume this is the most recent version of the 3.x branch. If so, I would create a bug report.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 2 months ago #193001
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic error 404 after updating
The thread started stated "version 3.21.5+200115". The most recent is from yesterday: limesurvey-3.21.6+200121holch wrote: I assume this is the most recent version of the 3.x branch. If so, I would create a bug report.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
4 years 2 months ago #193002
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic error 404 after updating
OK, was too lazy to look it up. So it is NOT the latest version. Then my next approach would be to update to the latest version, see what happens. If it persists, then create a bug report.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: JaimeAvalos, michaellindner
The topic has been locked.
- michaellindner
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 1
4 years 2 months ago #193019
by michaellindner
Replied by michaellindner on topic error 404 after updating
Updated our server to Version 3.21.6+200121, now things seems to be running smoothly again.
Thread can be closed, thanks for your help.
Thread can be closed, thanks for your help.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- JaimeAvalos
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
4 years 2 months ago #193070
by JaimeAvalos
Replied by JaimeAvalos on topic error 404 after updating
As michaellindner said it was a problem with the build. The problem dissapeared as soon as we updated to the latest build. Thank you all for your suggestions.
The topic has been locked.