/go/core/db/statement.php at line 188: Database exception
This error occurs with a particular calendar of a user. Other users seem not to be affected. Perhaps it's something within. CalDav from MacOS native client and MacOS Thunderbird clients affected. Once a 500 Error is thrown it stops syncing. It seems like via zPush the affected calendars sync. Calendar works in Webinterface without problems.
apache std log
mod_fcgid: stderr: go\\core\\db\\DbException in /usr/local/www/apache24/noexec/office.domain.de/office/go/core/db/Statement.php at line 188: Database exception
error log
additionally, dunno if related. But seems unrelated.
mod_fcgid: stderr: TypeError in /usr/local/www/apache24/noexec/office.domain.de/office/modules/calendar/model/Calendar.php at line 230: GO\\Calendar\\Model\\Calendar::getDefault(): Argument #1 ($user) must be of type GO\\Base\\Model\\User, null given, called in /usr/local/www/apache24/noexec/office.domain.de/office/modules/calendar/scripts.inc.php on line 3, referer: https://office.domain.de/
access log
77.21.85.244 - - [17/Mar/2025:11:34:55 +0100] "PROPPATCH /caldav/calendars/f.makies/neu-test-46/ HTTP/2.0" 301 272 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
77.21.85.244 - - [17/Mar/2025:11:34:55 +0100] "PROPPATCH /caldav/calendars/f.makies/neu-test-46 HTTP/2.0" 401 254 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
77.21.85.244 - - [17/Mar/2025:11:34:55 +0100] "PROPPATCH /caldav/calendars/f.makies/neu-test-46 HTTP/2.0" 207 258 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
77.21.85.244 - - [17/Mar/2025:11:34:56 +0100] "PROPPATCH /caldav/calendars/f.makies/firma-44 HTTP/2.0" 207 255 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
77.21.85.244 - - [17/Mar/2025:11:34:56 +0100] "PROPFIND /caldav/calendars/f.makies/firma-44/ HTTP/2.0" 301 269 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
77.21.85.244 - - [17/Mar/2025:11:34:56 +0100] "PROPFIND /caldav/calendars/f.makies/firma-44 HTTP/2.0" 401 254 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
77.21.85.244 - - [17/Mar/2025:11:33:51 +0100] "REPORT /caldav/calendars/f.makies/firma-44 HTTP/2.0" 500 185 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
Same with new/empty calendar
Can't create entries from CalDav.
77.21.85.244 - - [17/Mar/2025:19:09:48 +0100] "PUT /caldav/calendars/newuser/frankm1-47/ED3AD28E-E8C7-42F6-B0EB-0451CA93827F.ics HTTP/2.0" 500 185 "-" "macOS/15.3.2 (24D81) dataaccessd/1.0"
Environment
System: FreeBSD12 PHP: 8.1.18 DB-Server: MySQL 8.0.x Groupoffice: 6.8.109
Can you enable debug in config.php and try again? I hope to see a bit more verbose output on the error.
Ah ... yeah
Output
mod_fcgid: stderr: go\\core\\db\\DbException in /usr/local/www/apache24/noexec/office.domain.de/office/go/core/db/Statement.php at line 188: Database exception, DEBUG: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_bin,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=', Full SQL: SELECT task.id, task.uid, task.tasklistId, task.groupId, task.responsibleUserId, task.createdBy, task.createdAt, task.modifiedAt, task.modifiedBy, task.filesFolderId, task.due, task.start, task.estimatedDuration, task.progress, task.progressUpdated, task.title, task.description, task.color, task.recurrenceRule, task.priority, task.freeBusyStatus, task.privacy, task.percentComplete, task.uri, task.vcalendarBlobId, task.latitude, task.longitude, task.id AS `task.id`, ut.taskId AS `ut.taskId`, ut.userId AS `ut.userId`
[Tue Mar 18 12:11:07.408302 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: FROM `tasks_task` `task`
[Tue Mar 18 12:11:07.408338 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: INNER JOIN `tasks_tasklist` `tl` ON
[Tue Mar 18 12:11:07.408372 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: tl.id=task.taskListId AND tl.role != 4
[Tue Mar 18 12:11:07.408399 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: LEFT JOIN `tasks_task_user` `ut` ON
[Tue Mar 18 12:11:07.408425 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: task.id = ut.taskId AND ut.userId = 43
[Tue Mar 18 12:11:07.408452 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: INNER JOIN `cal_calendars` `c` ON
[Tue Mar 18 12:11:07.408469 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: c.tasklist_id = task.tasklistId
[Tue Mar 18 12:11:07.408484 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: WHERE
[Tue Mar 18 12:11:07.408498 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: (
[Tue Mar 18 12:11:07.408512 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: \t `c`.`id` = 44.0
[Tue Mar 18 12:11:07.408528 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: \tAND `task`.`uri` = '1624d532-9308-b84a-b6ab-8c7c7cfa552f.ics'
[Tue Mar 18 12:11:07.408548 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: )
[Tue Mar 18 12:11:07.408585 2025] [fcgid:warn] [pid 44355:tid 34391288832] [remote 77.21.85.244:59175] mod_fcgid: stderr: LIMIT 0,1
I am unsure why it's mixed. Perhaps the db didn't update the collations at some point. It's a really old db that got updated and updated through the major releases. The database itself is with InnoDB | utf8mb4_unicode_ci and so are the tables. So, unsure what went wrong. Perhaps it's a general problem?
Wouldn't it make sense to force the collation for the fields in doubt? (only in case a test proves it doens't succeed without) Like:
SELECT task.id, task.uid, task.tasklistId, task.groupId, task.responsibleUserId, task.createdBy, task.createdAt, task.modifiedAt, task.modifiedBy, task.filesFolderId, task.due, task.start, task.estimatedDuration, task.progress, task.progressUpdated, task.title, task.description, task.color, task.recurrenceRule, task.priority, task.freeBusyStatus, task.privacy, task.percentComplete, task.uri, task.vcalendarBlobId, task.latitude, task.longitude, task.id AS `task.id`, ut.taskId AS `ut.taskId`, ut.userId AS `ut.userId`
FROM `tasks_task` task
INNER JOIN `tasks_tasklist` tl ON tl.id = task.taskListId AND tl.role != 4
LEFT JOIN `tasks_task_user` ut ON task.id = ut.taskId AND ut.userId = 43
INNER JOIN `cal_calendars` c ON c.tasklist_id = task.tasklistId
WHERE c.id = 44.0
AND task.uri = '1624d532-9308-b84a-b6ab-8c7c7cfa552f.ics'
COLLATE utf8mb4_unicode_ci;
Strange. I've tried to replicate this using mysql 8.0.40 in docker but it doesn't happen here. I am using PHP 8.3 though. Maybe that makes a difference.