View Issue Details

This bug affects 3 person(s).
 28
IDProjectCategoryView StatusLast Update
19351Bug reportsComfortUpdatepublic2024-02-05 11:32
Reportercbm.it Assigned Tomohabmes  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version5.6.x 
Summary19351: Limesurvey broken after 5.6.50 -> 6.4.2 upgrade
Description

Hi! I'm trying to upgrade Limesurvey from version 5.6.50 to latest 6.4.2 but Limesurvey gives a 500 Internal server error right after the installation (done with ComfortUpdate) and database upgrade.

This is the full error text (in a page with a big image in the right):

500: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: boolean = integer
LINE 1: ...16 14:59:42' OR expires IS NULL) AND (user_status = 1)) AND ...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
An internal error occurred while the Web server was processing your request.
Please contact Administrator to report this problem.
Survey Error

I can provide details if needed, I kept the broken installation together with a restore of the working 5.6.50 installation.

Also note that I'm using Postgres as database, I know that there were some issues in the past with this kind of db.

Thanks!

Steps To Reproduce

Steps to reproduce

Upgrade from Limesurvey 5.6.50 to 6.4.2 (with ComfortUpdate)

Expected result

Limesurvey is upgraded

Actual result

Installation broken

TagsNo tags attached.
Bug heat28
Complete LimeSurvey version number (& build)5.6.50
I will donate to the project if issue is resolvedNo
BrowserFirefox 121.0
Database type & versionPostgres 15.5
Server OS (if known)Debian 12 (Bookworm)
Webserver software & version (if known)Apache 2.4.57-2
PHP VersionPHP 8.2.7

Users monitoring this issue

There are no users monitoring this issue.

Activities

tibor.pacalat

tibor.pacalat

2024-01-16 16:29

administrator   ~79188

This has already been resolved. The issue was in the sql. Fix will be deployed latest on Monday next week.

cbm.it

cbm.it

2024-01-17 16:38

reporter   ~79195

Thank you for the quick response. If it's fixed, it would probably be better to pull the latest upgrade from ComfortUpdate to avoid other users breaking their installations.

pirnr81

pirnr81

2024-01-22 15:02

reporter   ~79268

I had the same problem, with today's (22.1.2023) update, there is still an error message:

SQLSTATE[42804]: Datatype mismatch: 7 ERROR: column "user_status" cannot be cast automatically to type integer HINT: You might need to specify "USING user_status::integer".

File: updatedb_helper.php, Zeile 2815.

Sa8ooch1

Sa8ooch1

2024-01-22 17:15

reporter   ~79277

We're experiencing the same issue when updating from 5.6.50 to 6.4.2 using postgres.

Migration 619 introduces user_status and migration 621 fails changing type and default.

I "fixed" the issue manually via the following sql commands (we're only having three users)

alter table lime_users alter COLUMN user_status drop default;
alter table lime_users alter COLUMN user_status type integer using user_status::integer;
alter table lime_users alter COLUMN user_status set default 1;

Sa8ooch1

Sa8ooch1

2024-01-22 17:16

reporter   ~79280

Sorry for triple posting, the mantis showed a red internal error and I F5'd two times...

pirnr81

pirnr81

2024-01-23 08:39

reporter   ~79284

Brilliant, many thanks, Sa8ooch1.
I was notified of another workaround (which I did not try out myself):
"I was able to fix the error by changing line 138 in application/model/User.php changing the 1 to true"

DenisChenu

DenisChenu

2024-01-23 08:49

developer   ~79285

@tibor.pacalat where is the fix ? Ask user to manually update DB are not a fix, right ?

tibor.pacalat

tibor.pacalat

2024-01-23 10:38

administrator   ~79287

This was supposed to be the fix. It was tested on MSSQL and Postgres.
https://github.com/LimeSurvey/LimeSurvey/commit/356f60ba13578064c480ce8bdae120d761068f0d

It is a part of the newest release 6.4.3+240122.

I will retest and if it is needed, reopen this ticket.

holch

holch

2024-01-23 14:55

reporter   ~79291

But this bug report is about 5.6.x. If it is not fixed in LS 5 we can't close this bug report.

DenisChenu

DenisChenu

2024-01-23 15:07

developer   ~79292

But this bug report is about 5.6.x. If it is not fixed in LS 5 we can't close this bug report.

The new column was created only in 6 :)

Thank you @tibor.pacalat : it's because there are a forum post linking here :)

cbm.it

cbm.it

2024-02-01 11:04

reporter   ~79386

Any news on this? Thanks!

mohabmes

mohabmes

2024-02-02 12:21

developer   ~79391

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

tibor.pacalat

tibor.pacalat

2024-02-02 12:22

administrator   ~79392

This will be fixed with the next update on Monday.

LimeBot

LimeBot

2024-02-05 11:32

administrator   ~79409

Fixed in Release 6.4.5+240205

Related Changesets

LimeSurvey: master 823e621f

2024-02-02 12:21:49

mohabmes


Committer: GitHub Details Diff
Fixed issue 19351: Limesurvey broken after 5.6.50 to 6.4.2 upgrade (#3713)

Co-authored-by: Denis Chenu <denis@sondages.pro>
Affected Issues
19351
mod - application/config/version.php Diff File
mod - application/helpers/update/updates/Update_619.php Diff File
add - application/helpers/update/updates/Update_623.php Diff File
mod - application/models/User.php Diff File

Issue History

Date Modified Username Field Change
2024-01-16 16:23 cbm.it New Issue
2024-01-16 16:29 tibor.pacalat Assigned To => tibor.pacalat
2024-01-16 16:29 tibor.pacalat Status new => resolved
2024-01-16 16:29 tibor.pacalat Resolution open => fixed
2024-01-16 16:29 tibor.pacalat Note Added: 79188
2024-01-16 16:29 tibor.pacalat Bug heat 0 => 2
2024-01-17 16:38 cbm.it Note Added: 79195
2024-01-17 16:38 cbm.it Bug heat 2 => 4
2024-01-18 09:18 guest Bug heat 4 => 10
2024-01-22 15:02 pirnr81 Note Added: 79268
2024-01-22 15:02 pirnr81 Bug heat 10 => 12
2024-01-22 17:15 Sa8ooch1 Note Added: 79277
2024-01-22 17:15 Sa8ooch1 Bug heat 12 => 14
2024-01-22 17:16 Sa8ooch1 Note Added: 79280
2024-01-23 08:39 pirnr81 Note Added: 79284
2024-01-23 08:49 DenisChenu Note Added: 79285
2024-01-23 08:49 DenisChenu Bug heat 14 => 16
2024-01-23 10:38 tibor.pacalat Note Added: 79287
2024-01-23 14:55 holch Note Added: 79291
2024-01-23 14:55 holch Bug heat 16 => 18
2024-01-23 15:07 DenisChenu Note Added: 79292
2024-01-24 10:47 guest Bug heat 18 => 24
2024-01-24 11:05 tibor.pacalat Assigned To tibor.pacalat => mohabmes
2024-01-24 11:05 tibor.pacalat Status resolved => new
2024-01-24 11:05 tibor.pacalat Resolution fixed => reopened
2024-02-01 11:04 cbm.it Note Added: 79386
2024-02-02 12:21 mohabmes Changeset attached => LimeSurvey master 823e621f
2024-02-02 12:21 mohabmes Note Added: 79391
2024-02-02 12:21 mohabmes Resolution reopened => fixed
2024-02-02 12:21 mohabmes Bug heat 24 => 26
2024-02-02 12:22 tibor.pacalat Note Added: 79392
2024-02-02 12:22 tibor.pacalat Status new => resolved
2024-02-05 11:32 LimeBot Note Added: 79409
2024-02-05 11:32 LimeBot Status resolved => closed
2024-02-05 11:32 LimeBot Bug heat 26 => 28