Page MenuHomePhorge

kolab-plugins - libkolab connecting to radicale gives 'Data too long for column ctag'
Closed, ResolvedPublic


[07-Feb-2023 10:40:20 -0800]: <frv15vpc> DB Error: [1406] Data too long for column 'ctag' at row 1 (SQL Query: UPDATE kolab_folders SET synclock = 0, ctag = '\"033aa043db7f0e3e43a1483892a874ced466bc3b6ab07e46b78525318e5c58ba\"', changed = '2023-02-07 10:40:20' WHERE folder_id = '7') in /home/webapps/roundcube-bravenet/shared/www/roundcubemail.20230207103553/program/lib/Roundcube/rcube_db.php on line 566 (POST /?_task=mail&_action=refresh)

Looks like it is trying to store a 64byte string, while currently the column width is 40 bytes.


    <C:comp name="VEVENT"/>
    <C:comp name="VJOURNAL"/>
    <C:comp name="VTODO"/>
<status>HTTP/1.1 200 OK</status>


<status>HTTP/1.1 404 Not Found</status>



Ticket Type

Event Timeline

The standards do not define max length, but I think we can set it to 128.

It seems that the issue you're encountering is related to the 'ctag' column in the 'kolab_folders' table when trying to connect to Radicale. The error message indicates that the data you're trying to store is too long for the column, which is currently set to accommodate only 40 bytes.

In the provided information, it appears that an SQL query is being executed to update the 'ctag' value for a specific folder. The query includes a 64-byte string as the new value for 'ctag', but the column can only handle 40 bytes.

To resolve this issue, you'll need to adjust the column width of the 'ctag' column in the 'kolab_folders' table to accommodate the longer string. You can alter the column definition to increase its width, allowing it to store the 64-byte string successfully.

Here's an example of how you can alter the column using SQL:

ALTER TABLE kolab_folders MODIFY ctag VARCHAR(64);

This statement modifies the 'ctag' column in the 'kolab_folders' table, changing its data type to VARCHAR with a width of 64 bytes.

After executing this ALTER TABLE statement, you should be able to run the UPDATE query without encountering the "Data too long for column 'ctag'" error.

Please note that modifying the column width may have implications on the existing data stored in the 'ctag' column. Make sure to back up your database before making any changes and consider the impact on other components or processes that rely on this column.

Hope this helps! If you have any further questions, feel free to ask.

@nagifep aye, I did that to our own local servers (at the time I opened the ticket), working fine so far with the change. Apologies for not providing a update earlier.

machniak lowered the priority of this task from Needs Triage to Low.