[horde] Error inserting new event in kronolith

Dmitry Petrov dpetrov67 at gmail.com
Mon Mar 2 18:58:05 UTC 2026


Do you see anything else in the error log? Could you provide the backtrace?

On Mon, Mar 2, 2026 at 12:27 PM Ruud Baart <r.j.baart at prompt.nl> wrote:

> Hi Dmitry, thanks for the help.
>
> My database version is 29, 28_kronolith_icalendar_storage.php is present
> and my table is:
>
>                                          Table
> "public.kronolith_icalendar_storage"
>    Column    |          Type          | Collation | Nullable |
>                Default
>
> -------------+------------------------+-----------+----------+--------------------------------------------------------------
>  ical_id     | integer                |           | not null |
> nextval('kronolith_icalendar_storage_ical_id_seq'::regclass)
>  calendar_id | character varying(255) |           | not null |
>  event_uid   | character varying(255) |           | not null |
>  event_data  | text                   |           | not null |
>
> As you can see there is an auto increment but that dus not work. Perhaps a
> Postgres version problem? I use Postgres 17. I assume a statement
> something like "select
> nextval(pg_get_serial_sequence('kronolith_icalendar_storage', 'ical_id'));"
> must be added.
>
>
> Op 2-3-2026 om 17:20 schreef Dmitry Petrov:
>
> Hi Ruud,
>
> Looks like the scheme of your kronolith_icalendar_storage table is
> incorrect. Specifically, ical_id should be auto-increment.
>
> This is what I have on my end (but I am using mariadb):
> +-------------+------------------+------+-----+---------+----------------+
> | Field       | Type             | Null | Key | Default | Extra          |
> +-------------+------------------+------+-----+---------+----------------+
> | ical_id     | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
> | calendar_id | varchar(255)     | NO   | MUL | NULL    |                |
> | event_uid   | varchar(255)     | NO   |     | NULL    |                |
> | event_data  | text             | NO   |     | NULL    |                |
> +-------------+------------------+------+-----+---------+----------------+
>
> Please check your version of horde/kronolith and also check if you have
> horde/kronolith/migration/28_kronolith_icalendar_storage.php. Check what
> version value you have in kronolith_schema_info table (try select version
> from kronolith_schema_info).
>
> It might be a good idea to check other tables as well.
>
> Regards,
> Dmitry
>
>
> On Sun, Mar 1, 2026 at 12:33 PM Ruud Baart <r.j.baart at prompt.nl> wrote:
>
>> Thanks.
>>
>> Ok, that works, One error gone. The insert error still there.
>>
>>
>> Op 1-3-2026 om 18:27 schreef Dmitry Petrov:
>>
>> Hi Ruud,
>>
>> Looks like this was fixed in the dev version (
>> https://github.com/horde/Db/commit/af41feb432ff8ff82c74458ee31523971546ebd5
>> ), but there is no release yet.
>>
>> You can try composer require horde/db:dev-FRAMEWORK_6_0 to use the dev
>> version.
>>
>> Regards,
>> Dmitry
>>
>>
>> On Sun, Mar 1, 2026 at 10:02 AM Ruud Baart <r.j.baart at prompt.nl> wrote:
>>
>>> Hi again,
>>>
>>> My system: Debian trixie, postgres 17, php 8.4, caldav calendar, Horde
>>> (horde) <https://mail.tiswe.fr/horde/admin/config/config.php?app=horde>
>>> 6.0.0-beta1 , Agenda (kronolith)
>>> <https://mail.tiswe.fr/horde/admin/config/config.php?app=kronolith>
>>> 5.0.0-alpha9 , Horde_Dav 2.0.0alpha4
>>>
>>> There is an annoying, severe error while inserting and updating an event
>>> with kronolith - see logfile.
>>>
>>>  1. The first error seems to be that $result is not defined. I assume
>>>     there must be something added as: if (defined ($results)) { } else {}
>>>  2. Not null error means that ical_id is NULL. Either the databse
>>>     definition of kronolith_icalendar_storage id not correct or ical_id
>>>     must have a value
>>>
>>> I inserted a very simple event. No recurrence, just "new event at Mars
>>> 2, between 16:00 adn 17:00" . Thats all. The caldav calendar client
>>> (Thunderbird 147 an 148) accept the new event but will not show it.
>>> Immediately the calendar involved changes to read-only. After a forced
>>> sync the new event is inserted in the calendar. Further, I'm not sure
>>> but for me all these timestamps - see logfile - seems to be too much.
>>>
>>> Any help would be very welcome.
>>>
>>> ==============
>>>
>>> LOGFILE:
>>>
>>> ==============
>>>
>>> Log of the errors (1) insert new event and (2) update event:
>>>
>>> 1. Inserting new event
>>>
>>>     2026-03-01T15:24:18+01:00 WARN: HORDE [kronolith] PHP ERROR:
>>> Undefined variable $results [pid 469414 on line 1242 of
>>> "/xxx/yyy/zzz/horde/vendor/horde/db/lib/Horde/Db/Adapter/Postgresql/Schema.php"]
>>>     2026-03-01T15:24:18+01:00 WARN: HORDE [kronolith] PHP ERROR:
>>> Undefined variable $results [pid 469414 on line 1242 of
>>> "/xxx/yyy/zzz/horde/vendor/horde/db/lib/Horde/Db/Adapter/Postgresql/Schema.php"]
>>>     2026-03-01T15:24:18+01:00 WARN: HORDE [kronolith] PHP ERROR:
>>> Undefined variable $results [pid 469414 on line 1242 of
>>> "/xxx/yyy/zzz/horde/vendor/horde/db/lib/Horde/Db/Adapter/Postgresql/Schema.php"]
>>>     2026-03-01T15:24:18+01:00 WARN: HORDE [kronolith] PHP ERROR:
>>> Undefined variable $results [pid 469414 on line 1242 of
>>> "/xxx/yyy/zzz/horde/vendor/horde/db/lib/Horde/Db/Adapter/Postgresql/Schema.php"]
>>>     2026-03-01T15:24:18+01:00 ERR: HORDE [kronolith] SQL QUERY FAILED:
>>> SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column
>>> "ical_id" of relation "kronolith_icalendar_storage" violates not-null
>>> constraint
>>>     DETAIL:  Failing row contains (null, O72lQSaCnYpQP5ohZ5xBzaA,
>>> q-mA4rJ2N-Q9CqUpJqlTZbP, BEGIN:VCALENDAR
>>>     VERSION:2.0
>>>     PRODID:-//Mozilla.org/NONSGML Mozi...).
>>>              INSERT INTO "kronolith_icalendar_storage" ("ical_id",
>>> "calendar_id",
>>>                "event_uid", "event_data") VALUES (NULL,
>>> 'O72lQSaCnYpQP5ohZ5xBzaA',
>>>                'q-mA4rJ2N-Q9CqUpJqlTZbP', 'BEGIN:VCALENDAR VERSION:2.0
>>>                PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
>>>
>>>                DTSTAMP:20260301T142414Z
>>> UID:18a03796-b305-4e9a-8081-bc15e0ac8ce5
>>>                SUMMARY:new event
>>> DTSTART;TZID=Europe/Paris:20260302T160000
>>>                DTEND;TZID=Europe/Paris:20260302T170000 TRANSP:OPAQUE
>>> END:VEVENT
>>>                END:VCALENDAR ') RETURNING "ical_id" [pid 469414 on line
>>> 244 of
>>> "/xxx/yyy/zzz/horde/vendor/horde/db/lib/Horde/Db/Adapter/Pdo/Base.php"]
>>>
>>> 2. Updating the same event:
>>>
>>>     2026-03-01T15:47:52+01:00 ERR: HORDE [kronolith] SQL QUERY FAILED:
>>> SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column
>>> "ical_id" of relation "kronolith_icalendar_storage" violates not-null
>>> constraint
>>>     DETAIL:  Failing row contains (null, O72lQSaCnYpQP5ohZ5xBzaA,
>>> IxmVC0rpY2TqjVripojLEYE, BEGIN:VCALENDAR
>>>     VERSION:2.0
>>>     PRODID:-//Mozilla.org/NONSGML Mozi...).
>>>              INSERT INTO "kronolith_icalendar_storage" ("ical_id",
>>> "calendar_id",
>>>                "event_uid", "event_data") VALUES (NULL,
>>> 'O72lQSaCnYpQP5ohZ5xBzaA',
>>>                'IxmVC0rpY2TqjVripojLEYE', 'BEGIN:VCALENDAR VERSION:2.0
>>>                PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
>>>                BEGIN:VTIMEZONE TZID:Europe/Paris BEGIN:DAYLIGHT
>>> TZOFFSETFROM:+0100
>>>                TZOFFSETTO:+0200 DTSTART:20260329T030000
>>>                RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 TZNAME:CEST
>>> END:DAYLIGHT
>>>                BEGIN:STANDARD TZOFFSETFROM:+0200 TZOFFSETTO:+0100
>>>                DTSTART:20261025T030000
>>> RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
>>>                TZNAME:CE-T END:STANDARD END:VTIMEZONE BEGIN:VEVENT
>>>                CREATED:20260301T144529Z LAST-MODIFIED:20260301T144748Z
>>>                DTSTAMP:20260301T144748Z
>>> UID:bd1fdd65-c284-49c6-a20a-77bcc2a232e5
>>>                SUMMARY:new event STATUS:CONFIRMED
>>>                DTSTART;TZID=Europe/Paris:20260302T160500
>>>                DTEND;TZID=Europe/Paris:20260302T170500 CLASS:PUBLIC
>>> TRANSP:OPAQUE
>>>                SEQUENCE:1 X-MOZ-GENERATION:1 END:VEVENT END:VCALENDAR ')
>>> RETURNING
>>>                "ical_id" [pid 469569 on line 244 of "/home/websites/
>>> webmail.tiswe.fr/horde/vendor/horde/db/lib/Horde/Db/Adapter/Pdo/Base.php
>>> "]
>>>
>>>


More information about the horde mailing list