View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
20616Bug reportsInstallationpublic2026-08-03 16:01
Reportertassoman Assigned Toc_schmitz  
PrioritynoneSeverityblock 
Status closedResolutionno change required 
Summary20616: Invalid datetime format: 1292 Incorrect datetime value
Description

CDbCommand ha riportato un errore nell'esecuzione della query SQL: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'lastmodified' at row 23. The SQL statement executed was: ALTER TABLE lime_surveys ADD showregisterpolicy varchar(1) NOT NULL DEFAULT 'I'

Steps To Reproduce

Steps to reproduce

  1. install LS 6.16.1+260303
  2. open admin page
  3. install 6.17.12 build 260721
  4. open admin page
  5. see exeption error

Expected result

admin page with upgrade notification

Actual result

/opt/app-root/src/application/helpers/update/updates/Update_649.php(16): CDbCommand->addColumn("{{surveys}}", "showregisterpolicy", "string(1) NOT NULL DEFAULT 'I'")

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)6.17.12+260721
I will donate to the project if issue is resolvedNo
Browserany
Database type & versionMySQL Server 5.7.44-1.el7
Server OS (if known)Oracle linux
Webserver software & version (if known)Apache 2.4
PHP VersionPHP 8.3
Git branch / Pull Request URL

Users monitoring this issue

tassoman

Activities

tibor.pacalat

tibor.pacalat

2026-07-23 16:30

administrator   ~85260

I was not able to reproduce this issue locally following steps to reproduce in this ticket. I suspect that you have some corrupted data in the database.

c_schmitz

c_schmitz

2026-08-03 16:01

administrator   ~85310

This is a MySQL mode setting you need to set.

You need to remove NO_ZERO_DATE from your MySQL mode setting . see https://stackoverflow.com/questions/43589048/mysql-need-to-allow-0000-00-00-000000-dates

It was allowed in you server past, probably some update disallowed it, but there is still data with zeros in the table. Upon upgrading the table the new table structure is checked against the existing data, leading to the error.

Issue History

Date Modified Username Field Change
2026-07-21 18:13 tassoman New Issue
2026-07-21 18:13 tassoman File Added: Screenshot 2026-07-21 at 17-58-21 CDbException.png
2026-07-21 18:13 tassoman Issue Monitored: tassoman
2026-07-21 18:13 tassoman Bug heat 0 => 2
2026-07-23 16:30 tibor.pacalat Note Added: 85260
2026-07-23 16:30 tibor.pacalat Bug heat 2 => 4
2026-08-03 16:01 c_schmitz Assigned To => c_schmitz
2026-08-03 16:01 c_schmitz Status new => closed
2026-08-03 16:01 c_schmitz Resolution open => no change required
2026-08-03 16:01 c_schmitz Note Added: 85310
2026-08-03 16:01 c_schmitz Bug heat 4 => 6