webdav DbalException An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1
Steps to reproduce
Updated to nextcloud 31.0.4 A few days ago. Try to upload my calendar updated...
Expected behavior
No SQL error, for the calendar updates.
Actual behavior
[webdav] Fehler: An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1 PUT /remote.php/dav/calendars/xx/schichten/d9514d1f-60a0-4d55-ae12-c893ff193efd.ics von 217.93.33.110 von xxum 22.04.2025, 08:01:48
{
"reqId": "bbGLwuKLJwZePqKKBAwC",
"level": 3,
"time": "2025-04-22T06:17:53+00:00",
"remoteAddr": "123.123.123.123",
"user": "XxXxX",
"app": "webdav",
"method": "PUT",
"url": "/remote.php/dav/calendars/XxXxX/schichten/d62afd30-38a0-44d5-b643-85278f9da09b.ics",
"message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1",
"userAgent": "vdirsyncer/0.19.3",
"version": "31.0.4.1",
"exception": {
"Exception": "OC\\DB\\Exceptions\\DbalException",
"Message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1",
"Code": 1406,
"Trace": [
{
"file": "/app/www/public/lib/private/DB/ConnectionAdapter.php",
"line": 69,
"function": "wrap",
"class": "OC\\DB\\Exceptions\\DbalException",
"type": "::"
},
{
"file": "/app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 306,
"function": "executeStatement",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1547,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1488,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1295,
"function": "deleteCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1265,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/CalDAV/Calendar.php",
"line": 199,
"function": "createCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1098,
"function": "createFile",
"class": "Sabre\\CalDAV\\Calendar",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 504,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
"line": 49,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Server.php",
"line": 398,
"function": "start",
"class": "OCA\\DAV\\Connector\\Sabre\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 21,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/app/www/public/remote.php",
"line": 145,
"args": [
"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/app/www/public/lib/private/DB/Exceptions/DbalException.php",
"Line": 56,
"Previous": {
"Exception": "Doctrine\\DBAL\\Exception\\DriverException",
"Message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1",
"Code": 1406,
"Trace": [
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1976,
"function": "convert",
"class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1918,
"function": "handleDriverException",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1218,
"function": "convertExceptionDuringQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
"line": 292,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/Connection.php",
"line": 466,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/ConnectionAdapter.php",
"line": 67,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 306,
"function": "executeStatement",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1547,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1488,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1295,
"function": "deleteCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1265,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/CalDAV/Calendar.php",
"line": 199,
"function": "createCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1098,
"function": "createFile",
"class": "Sabre\\CalDAV\\Calendar",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 504,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
"line": 49,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Server.php",
"line": 398,
"function": "start",
"class": "OCA\\DAV\\Connector\\Sabre\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 21,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/app/www/public/remote.php",
"line": 145,
"args": [
"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/app/www/public/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
"Line": 118,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"Message": "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1",
"Code": 1406,
"Trace": [
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 132,
"function": "new",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"type": "::"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1212,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
"line": 292,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/Connection.php",
"line": 466,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/ConnectionAdapter.php",
"line": 67,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 306,
"function": "executeStatement",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1547,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1488,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1295,
"function": "deleteCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1265,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/CalDAV/Calendar.php",
"line": 199,
"function": "createCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1098,
"function": "createFile",
"class": "Sabre\\CalDAV\\Calendar",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 504,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
"line": 49,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Server.php",
"line": 398,
"function": "start",
"class": "OCA\\DAV\\Connector\\Sabre\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 21,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/app/www/public/remote.php",
"line": 145,
"args": [
"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
"Line": 24,
"Previous": {
"Exception": "PDOException",
"Message": "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1",
"Code": "22001",
"Trace": [
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 130,
"function": "execute",
"class": "PDOStatement",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1212,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/doctrine/dbal/src/Connections/PrimaryReadReplicaConnection.php",
"line": 292,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/Connection.php",
"line": 466,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connections\\PrimaryReadReplicaConnection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/ConnectionAdapter.php",
"line": 67,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->"
},
{
"file": "/app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 306,
"function": "executeStatement",
"class": "OC\\DB\\ConnectionAdapter",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1547,
"function": "executeStatement",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1488,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1295,
"function": "deleteCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/lib/public/AppFramework/Db/TTransactional.php",
"line": 45,
"function": "OCA\\DAV\\CalDAV\\{closure}",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/config/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line": 1265,
"function": "atomic",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/CalDAV/Calendar.php",
"line": 199,
"function": "createCalendarObject",
"class": "OCA\\DAV\\CalDAV\\CalDavBackend",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1098,
"function": "createFile",
"class": "Sabre\\CalDAV\\Calendar",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 504,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/app/www/public/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->"
},
{
"file": "/app/www/public/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
"line": 49,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/lib/Server.php",
"line": 398,
"function": "start",
"class": "OCA\\DAV\\Connector\\Sabre\\Server",
"type": "->"
},
{
"file": "/config/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 21,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->"
},
{
"file": "/app/www/public/remote.php",
"line": 145,
"args": [
"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"Line": 130
}
}
},
"message": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1",
"exception": {
"query": "UPDATE `*PREFIX*calendarobjects` SET `deleted_at` = :dcValue1, `uri` = :dcValue2 WHERE (`calendarid` = :dcValue3) AND (`calendartype` = :dcValue4) AND (`uri` = :dcValue5)"
},
"CustomMessage": "An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'uri' at row 1"
},
"id": "68073491a4f09"
}
Problem is when I update my calendar with vdirsyncer. After I have loaded it from my company calendar and updated the Titles. It has worked the last year so I expect the bug in nextcloud.
Calendar app version
5.2.1
CalDAV-clients used
Thunderbird, ios Calendar, vdirsyncer, Davx5
Browser
No response
Client operating system
No response
Server operating system
No response
Web server
Nginx
Database engine version
MariaDB
PHP engine version
PHP 8.4
Nextcloud version
31.0.4
Updated from an older installed version or fresh install
Updated from an older version
List of activated apps
Nextcloud configuration
Web server error log
Log file
Browser log
Additional info
No response
I can confirm, that upate the uri via ALTER TABLE oc_calendarobjects MODIFY uri varchar(355) NULL;
Has fixed the problems.
That was to early... now I get the same error again...
And I see 05094ead-be30-45fb-be02-3bff5d955024-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted.ics as uri... which is when I run force delete. Whats wrong?
Thanks for this last comment, this is interesting. The trashbin is behaving wrong. Is vdirsyncer trying to upload the same calendar object continuously?
@tcitworld yes, because I need to use force-delete which deletes all events, and then it reupload the old and new events. Else I can't get clean calendar entries of deleted or modified events.
One more thing is that the events that where stored in the trashbin that I can access via files, had are now deleted via occ trash cleanup but they still in the trashbin from the calendar and now this error is there - see screenshot.
Also it takes ages to load the list of deletet events in the calendar trashbin....
@tcitworld @ChristophWurst Would like to know how I can clean up the DB because I'm unable to delete the calendar trashbin entries, because the files in the real trashbin are already deleted via occ.
First of all, thanks for the report.
And I see 05094ead-be30-45fb-be02-3bff5d955024-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted.ics as uri... which is when I run force delete. Whats wrong?
This somehow looks like you restored some events and deleted them over and over again, is this correct?
Would like to know how I can clean up the DB because I'm unable to delete the calendar trashbin entries, because the files in the real trashbin are already deleted via occ.
I'm confused by this statement. The calendar and files trash bins are not linked in any way despite the name suggesting. If you want to clean the calendar trash bin you can do so by opening it, scrolling the modal to its bottom and clicking on the red button "Empty trash bin". This will permanently delete all events (and calendars) from the calendar trash bin.
First of all, thanks for the report.
@st3iny thanks, you're welcome.
And I see 05094ead-be30-45fb-be02-3bff5d955024-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted-deleted.ics as uri... which is when I run force delete. Whats wrong?
This somehow looks like you restored some events and deleted them over and over again, is this correct?
Yes, vdirsyncer is deleting the events, but uploads with the same UID the events that not updated. I have no other way to have a clean nextcloud calendar without delete all events, because python vdirsyncer is not able to to detect the deleted events. I'm not sure right now. Thats why I choise the delete complete the Calendar for this Events and reupload them.
Would like to know how I can clean up the DB because I'm unable to delete the calendar trashbin entries, because the files in the real trashbin are already deleted via occ.
I'm confused by this statement. The calendar and files trash bins are not linked in any way despite the name suggesting. If you want to clean the calendar trash bin you can do so by opening it, scrolling the modal to its bottom and clicking on the red button "Empty trash bin". This will permanently delete all events (and calendars) from the calendar trash bin.
Year I'm confued also, because I can't delete the Calendar Trash bin... It's loading very long (30+ minutes), there are many many events in the trash bin... I count in the DB I have 250k+ deleted events in oc_calendarobjects. If I get the trash bin loaded fully, I have tried delete single Events, with the message shown in the abdove screenshot. Had also tried these method as you described, but did not work so far. Will try it again once the trash bin is loaded, which blocks the website, and request to "wait" or "leave the website".
EDIT 2025-04-30_1700 UTC:
Result from the delete all button...
Hi @Dexus,
You can just delete the events directly in the database.
*** Firstly - Backup your database in case something goes wrong ***
Then you need to delete the events from two tables,
A. oc_calendarobjects_props is all the searchable properties extracted from the events, this will delete all those properties.
DELETE
FROM oc_calendarobjects_props
WHERE objectid IN (
SELECT id
FROM oc_calendarobjects
WHERE uri LIKE '%deleted%'
)
B. oc_calendarobjects is where all the events are, this will delete all of those.
DELETE
FROM oc_calendarobjects
WHERE uri LIKE '%deleted%'
@Dexus
I am curios on why you need to use vdirsyncer? What is your use case?
I am curios on why you need to use vdirsyncer? What is your use case?
@SebastianKrupinski I download my work shifts, remove anything that not match with my shifts, and modify the timezone, so it match my timezone. And because I need to share the events, I can't use the external calendars to import... which I would else use for it - If I would able to share and edit the event data a bit.
Also other event sources are like firedepartment events, that needs some "rewording" so I know what is important and none importent events.
I am curios on why you need to use vdirsyncer? What is your use case?
@SebastianKrupinski I download my work shifts, remove anything that not match with my shifts, and modify the timezone, so it match my timezone. And because I need to share the events, I can't use the external calendars to import... which I would else use for it - If I would able to share and edit the event data a bit.
Also other event sources are like firedepartment events, that needs some "rewording" so I know what is important and none importent events.
Okay, well I might be able to help you with that we witll soon have a command line import
https://github.com/nextcloud/server/pull/51925
@SebastianKrupinski thanks, will try it when it is landed. Have also added a note to it, because its always a missing feature on import/update calendars from external sources.
*** Firstly - Backup your database in case something goes wrong ***
Then you need to delete the events from two tables,
A. oc_calendarobjects_props is all the searchable properties extracted from the events, this will delete all those properties.
DELETE FROM oc_calendarobjects_props WHERE objectid IN ( SELECT id FROM oc_calendarobjects WHERE uri LIKE '%deleted%' )B. oc_calendarobjects is where all the events are, this will delete all of those.
DELETE FROM oc_calendarobjects WHERE uri LIKE '%deleted%'
wow, how fast now all is again :D