View Issue Details

This bug affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
18789Bug reportsInstallationpublic2023-06-12 10:45
Reporterriqcles Assigned Toc_schmitz  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version6.0.x 
Summary18789: Updated database PostgreSQL 13 - LimeSurvey version 6.02 to 6.04
Description

deletion of the old directory, keeping the config.php file
after decompressing the new version of LimeSurvey, updating the proposed database (600 to 604) and crashing.

The database contains nothing (no old questionnaires, no user accounts, no label , no specific theme)

modification of the config file to activate the debug mode (2 and 1). The content is:

CDbException

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[25P02]: In failed sql transaction: 7 ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction. The SQL statement executed was: UPDATE "lime_boxes" SET "desc"=:desc, "buttontext"=:buttontext WHERE title = 'Create survey' AND page = 'welcome'. Bound with :desc='Create a new survey from scratch. Or simply copy or import an existing survey.', :buttontext='Create survey'

/var/www/html/limesurvey/vendor/yiisoft/yii/framework/db/CDbCommand.php(358)

346 {
347 if($this->_connection->enableProfiling)
348 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349
350 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351 $message=$e->getMessage();
352 Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354
355 if(YII_DEBUG)
356 $message.='. The SQL statement executed was: '.$this->getText().$par;
357
358 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360 }
361 }
362
363 /*
364
Executes the SQL statement and returns query result.
365 This method is for executing an SQL query that returns result set.
366
@param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367 to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368
them in this way can improve the performance. Note that if you pass parameters in this way,
369 you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370
Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace
#0
+
/var/www/html/limesurvey/vendor/yiisoft/yii/framework/db/CDbCommand.php(1313): CDbCommand->execute()
#1

/var/www/html/limesurvey/application/helpers/update/updates/Update_601.php(37): CDbCommand->update()

32 '{{boxes}}',
33 [
34 'desc' => 'Create a new survey from scratch. Or simply copy or import an existing survey.',
35 'buttontext' => 'Create survey'
36 ],
37 "title = 'Create survey' AND page = 'welcome'"
38 );
39 }
40
41 public function updateSurveyList()
42 {

#2

/var/www/html/limesurvey/application/helpers/update/updates/Update_601.php(19): LimeSurvey\Helpers\Update\Update_601->updateCreateSurvey()

14 try {
15 $this->db->createCommand()->addColumn('{{boxes}}', 'buttontext', 'string(255)');
16 } catch (Exception $e) {
17 // Column already exists - ignore
18 }
19 $this->updateCreateSurvey();
20 $this->updateSurveyList();
21 $this->updateGlobalSettings();
22 $this->updateComfortUpdate();
23 $this->updateLimeStore();
24 $this->updateThemes();

#3

/var/www/html/limesurvey/application/helpers/update/DatabaseUpdateBase.php(47): LimeSurvey\Helpers\Update\Update_601->up()

42 */
43 public function safeUp()
44 {
45 $transaction = $this->db->beginTransaction();
46 try {
47 $this->up();
48 $this->updateVersion();
49 $transaction->commit();
50 } catch (Throwable $e) {
51 $transaction->rollback();
52 throw $e;

#4
+
/var/www/html/limesurvey/application/helpers/update/updatedb_helper.php(88): LimeSurvey\Helpers\Update\DatabaseUpdateBase->safeUp()
#5
+
/var/www/html/limesurvey/application/controllers/AdminController.php(166): db_upgrade_all()
#6
+
/var/www/html/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): AdminController->run()
#7
+
/var/www/html/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController()
#8
+
/var/www/html/limesurvey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#9
+
/var/www/html/limesurvey/index.php(161): CApplication->run()

Steps To Reproduce

Steps to reproduce

(Replace this text with detailed step-by-step instructions on how to reproduce the issue)

Expected result

(Write here what you expected to happen)

Actual result

(Write here what happened instead)

TagsNo tags attached.
Attached Files
Update_database_1.png (30,428 bytes)   
Update_database_1.png (30,428 bytes)   
Update_database_2.png (10,759 bytes)   
Update_database_2.png (10,759 bytes)   
Update_database_3.png (22,885 bytes)   
Update_database_3.png (22,885 bytes)   
Bug heat14
Complete LimeSurvey version number (& build)limesurvey6.0.4+230427
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgresql 13
Server OS (if known)CentOS 7.9
Webserver software & version (if known)Apache/2.4.6
PHP VersionPHP/8.1.18 Yii Framework/1.1.28

Relationships

has duplicate 18827 closedc_schmitz DB update from 6.0.2 to 6.0.7 fails (PostgreSQL) 

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2023-05-02 10:54

administrator   ~74744

That error message doesn't really tell me why it fails. String too long, or?

riqcles

riqcles

2023-05-02 16:11

reporter   ~74758

I don't know. I just installed version 6.02, with the default setting (database initialization), then after I downloaded version 6.04 and I got the message for the database update.

I will try the new version 6.05 to see.

riqcles

riqcles

2023-05-02 16:19

reporter   ~74760

Same error with version 6.05

riqcles

riqcles

2023-05-02 16:29

reporter   ~74761

I tried again:
deleting the database
installation of version 602 (without config file)
finalizing the installation
login to the administration page --> OK
renaming version 602 directory
install version 605
copy of the config.ini file from the 602 to the 605
login to admin page
DB upgrade information page (499 to 605)
Crash.

If I put the old directory of version 602 back, the application works.

ollehar

ollehar

2023-05-02 17:19

administrator   ~74762

Last edited: 2023-05-02 17:19

Well someone has to figure out how to get Postgres to tell us WHY it failed. Maybe check database logs?

riqcles

riqcles

2023-05-05 12:20

reporter   ~74836

I try today. Log file is here

postgresql-2023-05-05.log (112,558 bytes)
riqcles

riqcles

2023-05-05 15:25

reporter   ~74840

If I do a clean install of 6.0.5, after removing the old database, and following the installation procedure, I don't have a database problem.

I'm going to try a migration from V3.X to 6.05, because that's what will happen to me later.

riqcles

riqcles

2023-05-05 17:18

reporter   ~74861

I installed a blank V3.22.19 (installation procedure and creation of a database) then I installed a V605 while keeping the config.php file from V3.
The migration is requested and is going smoothly.

I think we can close the bug, because it only happens if we go from version 6.0.0 / 6.0.2 to version 6.0.3 and more.

c_schmitz

c_schmitz

2023-06-08 17:34

administrator   ~75487

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

LimeBot

LimeBot

2023-06-12 10:45

administrator   ~75541

Fixed in Release 6.1.3+230612

Related Changesets

LimeSurvey: master f8edfc95

2023-06-08 17:33:49

c_schmitz

Details Diff
Fixed issue 18789: Database upgrade error when trying to update from 6.0.x to any later version and using Postgres Affected Issues
18789
mod - application/helpers/update/updates/Update_601.php Diff File

Issue History

Date Modified Username Field Change
2023-04-26 19:36 riqcles New Issue
2023-04-26 19:36 riqcles File Added: Update_database_1.png
2023-04-26 19:36 riqcles File Added: Update_database_2.png
2023-04-26 19:36 riqcles File Added: Update_database_3.png
2023-05-02 10:46 ollehar Priority none => normal
2023-05-02 10:54 ollehar Note Added: 74744
2023-05-02 10:54 ollehar Bug heat 0 => 2
2023-05-02 16:11 riqcles Note Added: 74758
2023-05-02 16:11 riqcles Bug heat 2 => 4
2023-05-02 16:19 riqcles Note Added: 74760
2023-05-02 16:29 riqcles Note Added: 74761
2023-05-02 17:19 ollehar Note Added: 74762
2023-05-02 17:19 ollehar Note Edited: 74762
2023-05-05 12:20 riqcles Note Added: 74836
2023-05-05 12:20 riqcles File Added: postgresql-2023-05-05.log
2023-05-05 15:25 riqcles Note Added: 74840
2023-05-05 17:18 riqcles Note Added: 74861
2023-05-05 17:18 riqcles File Added: postgresql-2023-05-05MAJ_V3_V6.log
2023-05-23 15:57 p_teichmann Status new => acknowledged
2023-06-08 17:34 c_schmitz Changeset attached => LimeSurvey master f8edfc95
2023-06-08 17:34 c_schmitz Note Added: 75487
2023-06-08 17:34 c_schmitz Bug heat 4 => 6
2023-06-08 17:34 c_schmitz Assigned To => c_schmitz
2023-06-08 17:34 c_schmitz Resolution open => fixed
2023-06-08 17:34 c_schmitz Status acknowledged => resolved
2023-06-08 17:34 c_schmitz Relationship added has duplicate 18827
2023-06-08 17:34 c_schmitz Bug heat 6 => 12
2023-06-12 10:45 LimeBot Note Added: 75541
2023-06-12 10:45 LimeBot Status resolved => closed
2023-06-12 10:45 LimeBot Bug heat 12 => 14