View Issue Details

IDProjectCategoryView StatusLast Update
16577Bug reportsQuestion editorpublic2020-08-17 13:59
Reporterfabianlehner Assigned To 
PrioritynoneSeveritypartial_block 
Status newResolutionopen 
Product Version4.3.9 
Summary16577: "Invalid text representation" when trying to save new question
Description

When trying to save a question (tried S, |) in a newly-created survey, the question cannot be saved (empty red error window in admin). The error report I receive per Mail reads:

2020/08/11 09:53:58 [error] [system.db.CDbCommand] CDbCommand::fetch()
failed: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:
invalid input syntax for integer: ""
LINE 1: ...ime_questions" "t" WHERE sid = '268427' AND qid = '' LIMIT
1
^. The
SQL statement executed was: SELECT * FROM "lime_questions" "t" WHERE
sid = :sid AND qid = :qid LIMIT 1.
2020/08/11 09:53:58 [error] [exception.CDbException] CDbException:
CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]:
Invalid text representation: 7 ERROR: invalid input syntax for
integer: ""
LINE 1: ...ime_questions" "t" WHERE sid = '268427' AND qid = '' LIMIT
1

For some reason, the IDs seem to be handed to the database as Strings:
#4
/home/greeneventstirol/public_html/limesurvey-4.3.9/application/controllers/QuestionEditorController.php(271):
CActiveRecord->find('sid = :sid AND ...', Array)
#5 [internal function]:
QuestionEditorController->actionSaveQuestionData('268427')

Steps To Reproduce

Create a new survey, new group, try to save a new question.

Additional Information

Full stack trace:
2020/08/11 09:53:58 [error] [system.db.CDbCommand] CDbCommand::fetch()
failed: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:
invalid input syntax for integer: ""
LINE 1: ...ime_questions" "t" WHERE sid = '268427' AND qid = '' LIMIT
1
^. The
SQL statement executed was: SELECT * FROM "lime_questions" "t" WHERE
sid = :sid AND qid = :qid LIMIT 1.
2020/08/11 09:53:58 [error] [exception.CDbException] CDbException:
CDbCommand failed to execute the SQL statement: SQLSTATE[22P02]:
Invalid text representation: 7 ERROR: invalid input syntax for
integer: ""
LINE 1: ...ime_questions" "t" WHERE sid = '268427' AND qid = '' LIMIT
1
^ in
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/db/CDbCommand.php:543
Stack trace:
#0
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/db/CDbCommand.php(415):
CDbCommand->queryInternal('fetch', Array, Array)
#1
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/db/ar/CActiveRecord.php(1359):
CDbCommand->queryRow()
#2
/home/greeneventstirol/public_html/limesurvey-4.3.9/application/models/LSActiveRecord.php(74):
CActiveRecord->query(Object(CDbCriteria), false)
#3
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/db/ar/CActiveRecord.php(1464):
LSActiveRecord->query(Object(CDbCriteria))
#4
/home/greeneventstirol/public_html/limesurvey-4.3.9/application/controllers/QuestionEditorController.php(271):
CActiveRecord->find('sid = :sid AND ...', Array)
#5 [internal function]:
QuestionEditorController->actionSaveQuestionData('268427')
#6
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/actions/CAction.php(109):
ReflectionMethod->invokeArgs(Object(QuestionEditorController), Array)
#7
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/actions/CInlineAction.php(47):
CAction->runWithParamsInternal(Object(QuestionEditorController),
Object(ReflectionMethod), Array)
#8
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/CController.php(308):
CInlineAction->runWithParams(Array)
#9
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/CController.php(286):
CController->runAction(Object(CInlineAction))
#10
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/CController.php(265):
CController->runActionWithFilters(Object(CInlineAction), Array)
#11
/home/greeneventstirol/public_html/limesurvey-4.3.9/application/controllers/LSBaseController.php(199):
CController->run('saveQuestionDat...')
#12
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/CWebApplication.php(282):
LSBaseController->run('saveQuestionDat...')
#13
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/web/CWebApplication.php(141):
CWebApplication->runController('questionEditor/...')
#14
/home/greeneventstirol/public_html/limesurvey-4.3.9/framework/base/CApplication.php(185):
CWebApplication->processRequest()
#15
/home/greeneventstirol/public_html/limesurvey-4.3.9/index.php(182):
CApplication->run()
#16 {main}
REQUEST_URI=/checkliste/index.php/questionEditor/saveQuestionData/gid/106/sid/268427

TagsNo tags attached.
Complete LimeSurvey version number (& build)4.3.9+200806
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionPostgreSQL 11.7
Server OS (if known)Debian 10
Webserver software & version (if known)
PHP Version7.4.9

Activities

fabianlehner

fabianlehner

2020-08-11 12:19

reporter   ~59404

Sorry, there's a mistake in my steps to reproduce.
It should be "create new survey" instead of "new database", obviously.

fabianlehner

fabianlehner

2020-08-17 13:59

reporter   ~59470

Duplicate 16566, resolved by 16425fff
please release :)

Issue History

Date Modified Username Field Change
2020-08-11 12:16 fabianlehner New Issue
2020-08-11 12:19 fabianlehner Note Added: 59404
2020-08-11 12:42 user225042 Steps to Reproduce Updated View Revisions
2020-08-17 13:59 fabianlehner Note Added: 59470