View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18170Bug reportsData Entry (non public)public2022-09-27 21:27
Reporterc_schmitz Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Fixed in Version5.3.x 
Summary18170: Database error when clicking entry to edit and survey was deactivated
Description

Database error when clicking entry to edit and survey was already deactivated

Steps To Reproduce

Steps to reproduce

Create a survey, activate it, enter one response in the survey.
Go to the response browsing screen.
In another tab deactivate the survey.
In the first tab now click the button to edit the response

Expected result

A message that the the survey is not active. A button back to the main screen of the survey.

Actual result

SQL error, see Call stack below

'REQUEST_URI' =>
'/admin/dataentry/sa/editdata/subaction/edit/surveyid/549923/id/15',
  'SCRIPT_NAME' => '/index.php',
  'CONTENT_LENGTH' => '',
  'CONTENT_TYPE' => '',
  'REQUEST_METHOD' => 'GET',
  'QUERY_STRING' => '',
  'FCGI_ROLE' => 'RESPONDER',
  'PHP_SELF' => '/index.php',
  'REQUEST_TIME_FLOAT' => 1654093587.7833531,
  'REQUEST_TIME' => 1654093587,
)
2022/06/01 16:26:27 [error] [exception.CDbException] CDbException:
CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[42S02]:
Base table or view not found: 1146 Table 'lsusr_239935.survey_549923'
doesn't exist in
/limesurvey/framework/db/CDbCommand.php:543
Stack trace:
#0
/limesurvey/framework/db/CDbCommand.php(415):
CDbCommand->queryInternal('fetch', Array, Array)
#1
/limesurvey/framework/db/ar/CActiveRecord.php(1359):
CDbCommand->queryRow()
#2
/limesurvey/application/models/LSActiveRecord.php(77):
CActiveRecord->query(Object(CDbCriteria), false)
#3
/limesurvey/framework/db/ar/CActiveRecord.php(1494):
LSActiveRecord->query(Object(CDbCriteria))
#4
/limesurvey/application/controllers/admin/DataEntry.php(515):
CActiveRecord->findByPk(15)
#5 [internal function]: DataEntry->editdata('edit', 15, 549923)
#6
/limesurvey/framework/web/actions/CAction.php(115):
ReflectionMethod->invokeArgs(Object(DataEntry), Array)
#7
/limesurvey/application/core/SurveyCommonAction.php(83):
CAction->runWithParamsInternal(Object(DataEntry),
Object(ReflectionMethod), Array)
#8
/limesurvey/framework/web/CController.php(308):
SurveyCommonAction->runWithParams(Array)
#9
/limesurvey/framework/web/CController.php(286):
CController->runAction(Object(DataEntry))
#10
/limesurvey/framework/web/CController.php(265):
CController->runActionWithFilters(Object(DataEntry), Array)
#11
/limesurvey/application/controllers/AdminController.php(226):
CController->run('dataentry')
#12
/limesurvey/framework/web/CWebApplication.php(282):
AdminController->run('dataentry')
#13
/limesurvey/framework/web/CWebApplication.php(141):
CWebApplication->runController('admin/dataentry...')
#14
/limesurvey/framework/base/CApplication.php(185):
CWebApplication->processRequest()
#15 /limesurvey/index.php(194):
CApplication->run()
#16 {main}
REQUEST_URI=/admin/dataentry/sa/editdata/subaction/edit/surveyid/549923/id/15
TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)5.3.18
I will donate to the project if issue is resolvedNo
Browser
Database type & versionn/a
Server OS (if known)
Webserver software & version (if known)
PHP Versionn/a

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-06-02 16:12

developer   ~70211

Last edited: 2022-06-02 16:12

In 3.X : redirected with a warning.

Same ? Or an complete page ?

In 3.X : admin/dataentry/sa/editdata is broken too. View is OK.

DenisChenu

DenisChenu

2022-06-08 10:12

developer   ~70292

Last edited: 2022-06-08 10:13

I start here, but with response deleted (not table , only single response)
https://github.com/LimeSurvey/LimeSurvey/pull/2461

DenisChenu

DenisChenu

2022-06-08 10:16

developer   ~70293

Start replace 500 error Call to a member function decrypt() on null
to clean 404 issue

DenisChenu

DenisChenu

2022-06-08 10:56

developer   ~70294

Use of redirect like response see or quexml export.

Move to another solution for both ?

gabrieljenik

gabrieljenik

2022-06-27 01:34

manager   ~70540

Tested OK!

image.png (42,450 bytes)   
image.png (42,450 bytes)   
DenisChenu

DenisChenu

2022-07-01 14:35

developer   ~70670

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33611

Related Changesets

LimeSurvey: master ccc2ec91

2022-07-01 14:33:03

DenisChenu


Committer: GitHub Details Diff
Fixed Issue 18170: Database error when clicking entry to edit and survey was deactivated (#2461) Affected Issues
18170
mod - application/controllers/ResponsesController.php Diff File
mod - application/controllers/admin/DataEntry.php Diff File

Issue History

Date Modified Username Field Change
2022-06-02 10:40 c_schmitz New Issue
2022-06-02 10:41 c_schmitz Steps to Reproduce Updated
2022-06-02 10:42 c_schmitz Steps to Reproduce Updated
2022-06-02 10:43 c_schmitz Assigned To => DenisChenu
2022-06-02 10:43 c_schmitz Status new => assigned
2022-06-02 10:43 c_schmitz Priority none => normal
2022-06-02 14:52 c_schmitz Summary Database error when clicking entry to edit and survey was activated => Database error when clicking entry to edit and survey was deactivated
2022-06-02 14:52 c_schmitz Description Updated
2022-06-02 16:12 DenisChenu Note Added: 70211
2022-06-02 16:12 DenisChenu Bug heat 0 => 2
2022-06-02 16:12 DenisChenu Note Edited: 70211
2022-06-08 10:12 DenisChenu Note Added: 70292
2022-06-08 10:13 DenisChenu Note Edited: 70292
2022-06-08 10:16 DenisChenu Note Added: 70293
2022-06-08 10:16 DenisChenu File Added: Capture d’écran du 2022-06-08 10-15-53.png
2022-06-08 10:56 DenisChenu Assigned To DenisChenu => c_schmitz
2022-06-08 10:56 DenisChenu Status assigned => ready for code review
2022-06-08 10:56 DenisChenu Note Added: 70294
2022-06-27 01:34 gabrieljenik Note Added: 70540
2022-06-27 01:34 gabrieljenik File Added: image.png
2022-06-27 01:34 gabrieljenik Bug heat 2 => 4
2022-06-27 01:34 gabrieljenik Status ready for code review => ready for merge
2022-07-01 14:35 DenisChenu Changeset attached => LimeSurvey master ccc2ec91
2022-07-01 14:35 DenisChenu Note Added: 70670
2022-07-01 14:35 DenisChenu Assigned To c_schmitz => DenisChenu
2022-07-01 14:35 DenisChenu Resolution open => fixed
2022-07-01 17:13 DenisChenu Status ready for merge => resolved
2022-07-01 17:13 DenisChenu Fixed in Version => 5.3.x
2022-09-27 21:27 c_schmitz Status resolved => closed