JodliDev / calendar

GNU Affero General Public License v3.0
15 stars 12 forks source link

no events are shown after page refresh (although they are created successfully): PHP Warning: array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204 #12

Open chaos-prevails opened 2 years ago

chaos-prevails commented 2 years ago

Dear all,

I've tried to install this version with RC1.5, and I could get calendar running (using the composer.json file provided here, and the installation how to, incl initializing the DB) 1) I can add a dav resource, and it identifies, and adds all calendars 2) I can create an event, and even send out invitations. The event shows in RC, and is saved in the caldav backend 3) however, after one page refresh not a single event is shown (in no view), although the events exists. It also doesn't show events created e.g. via SOGo backend

I get the following error (with debugging enabled):


11 15:13:01 mail CRON[2947859]: (sogo) CMD (/usr/sbin/sogo-tool expire-sessions 30 >/dev/null 2>&1; /usr/sbin/sogo-ealarms-notify >/dev/null 2>&1)
May 11 15:13:01 mail CRON[2947860]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Ctag indicates that calendar "16" needs update!
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Calendar "16" needs update.
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Syncing calendar id "16".
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5@mydomain.org/Calendar/personal/
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/111A17B59FF1E94FA4539055E944F082-1CB5DAFE4E2ABC8E.ics
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BAF00-D-49F0CA00.ics
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BB180-F-49F0CA00.ics
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/94274555-4f99-4d43-9c48-71f307d15284.ics
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/EDF4470597E638691548522660589AC7-1CB5DAFE4E2ABC8E.ics
May 11 15:13:24 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:24 mail roundcube: (
May 11 15:13:24 mail roundcube:     [url] => /SOGo/dav/it5@mydomain.org/Calendar/personal/
May 11 15:13:24 mail roundcube:     [etag] => None
May 11 15:13:24 mail roundcube: )
May 11 15:13:24 mail roundcube: 
May 11 15:13:24 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:24 mail roundcube: (
May 11 15:13:24 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/111A17B59FF1E94FA4539055E944F082-1CB5DAFE4E2ABC8E.ics
May 11 15:13:24 mail roundcube:     [etag] => gcs00000000
May 11 15:13:24 mail roundcube: )
May 11 15:13:24 mail roundcube: 
May 11 15:13:24 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:24 mail roundcube: (
May 11 15:13:24 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BAF00-D-49F0CA00.ics
May 11 15:13:24 mail roundcube:     [etag] => gcs00000000
May 11 15:13:24 mail roundcube: )
May 11 15:13:24 mail roundcube: 
May 11 15:13:24 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:24 mail roundcube: (
May 11 15:13:24 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BB180-F-49F0CA00.ics
May 11 15:13:24 mail roundcube:     [etag] => gcs00000000
May 11 15:13:24 mail roundcube: )
May 11 15:13:24 mail roundcube: 
May 11 15:13:24 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:24 mail roundcube: (
May 11 15:13:24 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/94274555-4f99-4d43-9c48-71f307d15284.ics
May 11 15:13:24 mail roundcube:     [etag] => gcs00000000
May 11 15:13:24 mail roundcube: )
May 11 15:13:24 mail roundcube: 
May 11 15:13:24 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:24 mail roundcube: (
May 11 15:13:24 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/EDF4470597E638691548522660589AC7-1CB5DAFE4E2ABC8E.ics
May 11 15:13:24 mail roundcube:     [etag] => gcs00000000
May 11 15:13:24 mail roundcube: )
May 11 15:13:24 mail roundcube: 
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Created 0 new events, updated 0 event.
May 11 15:13:24 mail roundcube: <3sa0hej7> caldav_driver: Successfully synced calendar id "16".
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Ctag indicates that calendar "16" needs update!
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Calendar "16" needs update.
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Syncing calendar id "16".
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5@mydomain.org/Calendar/personal/
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/111A17B59FF1E94FA4539055E944F082-1CB5DAFE4E2ABC8E.ics
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BAF00-D-49F0CA00.ics
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BB180-F-49F0CA00.ics
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/94274555-4f99-4d43-9c48-71f307d15284.ics
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/personal/EDF4470597E638691548522660589AC7-1CB5DAFE4E2ABC8E.ics
May 11 15:13:34 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:34 mail roundcube: (
May 11 15:13:34 mail roundcube:     [url] => /SOGo/dav/it5@mydomain.org/Calendar/personal/
May 11 15:13:34 mail roundcube:     [etag] => None
May 11 15:13:34 mail roundcube: )
May 11 15:13:34 mail roundcube: 
May 11 15:13:34 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:34 mail roundcube: (
May 11 15:13:34 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/111A17B59FF1E94FA4539055E944F082-1CB5DAFE4E2ABC8E.ics
May 11 15:13:34 mail roundcube:     [etag] => gcs00000000
May 11 15:13:34 mail roundcube: )
May 11 15:13:34 mail roundcube: 
May 11 15:13:34 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:34 mail roundcube: (
May 11 15:13:34 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BAF00-D-49F0CA00.ics
May 11 15:13:34 mail roundcube:     [etag] => gcs00000000
May 11 15:13:34 mail roundcube: )
May 11 15:13:34 mail roundcube: 
May 11 15:13:34 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:34 mail roundcube: (
May 11 15:13:34 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/2C15DC-627BB180-F-49F0CA00.ics
May 11 15:13:34 mail roundcube:     [etag] => gcs00000000
May 11 15:13:34 mail roundcube: )
May 11 15:13:34 mail roundcube: 
May 11 15:13:34 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:34 mail roundcube: (
May 11 15:13:34 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/94274555-4f99-4d43-9c48-71f307d15284.ics
May 11 15:13:34 mail roundcube:     [etag] => gcs00000000
May 11 15:13:34 mail roundcube: )
May 11 15:13:34 mail roundcube: 
May 11 15:13:34 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Could not perform event creation: Array
May 11 15:13:34 mail roundcube: (
May 11 15:13:34 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/personal/EDF4470597E638691548522660589AC7-1CB5DAFE4E2ABC8E.ics
May 11 15:13:34 mail roundcube:     [etag] => gcs00000000
May 11 15:13:34 mail roundcube: )
May 11 15:13:34 mail roundcube: 
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Created 0 new events, updated 0 event.
May 11 15:13:34 mail roundcube: <3sa0hej7> caldav_driver: Successfully synced calendar id "16".

So it seems to find all events, but then when trying to show remote events, the parameter $update["remote_event"] seems to be null.

this is my composer.json (I had to manually download the calendar package and unzip it to plugins directory, as I couldn't add it via composer cli):

{
    "name": "roundcube/roundcubemail",
    "description": "The Roundcube Webmail suite",
    "license": "GPL-3.0+",
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://plugins.roundcube.net"
        },
        "calendar": {
            "type": "vcs",
            "url": "https://github.com/JodliDev/calendar",
            "minimum-stability": "dev"
        },
        "libcalendaring": {
            "type": "vcs",
            "url": "https://github.com/JodliDev/libcalendaring",
            "minimum-stability": "dev"
        }
    },
    "require": {
        "php": ">=5.5.0",
        "pear/pear-core-minimal": "~1.10.1",
        "pear/auth_sasl": "~1.1.0",
        "pear/net_idna2": "~0.2.0",
        "pear/mail_mime": "~1.10.0",
        "pear/net_smtp": "~1.10.0",
        "pear/crypt_gpg": "~1.6.3",
        "pear/net_sieve": "~1.4.5",
        "roundcube/plugin-installer": ">=0.2.0",
        "masterminds/html5": "~2.7.0",
        "endroid/qr-code": "~1.6.5",
        "kolab/net_ldap3": "~1.1.1",
        "roundcube/rtf-html-php": "~2.1",
        "guzzlehttp/guzzle": "^6.5.5",
        "roundcube/carddav": "^4.3",
        "sabre/dav": "^4.3",
        "jodlidev/libcalendaring": "dev-master",
        "kolab/libkolab": "^3.5"
    },
    "require-dev": {
        "phpunit/phpunit": "^4.8.36 || ^5.7.21"
    },
    "suggest": {
        "mkopinsky/zxcvbn-php": "^4.4.2 required for Zxcvbn password strength driver"
    },
    "config": {
        "home": "/opt/www/roundcubemail/.composer",
        "data-dir": "/opt/www/roundcubemail/.composer",
        "cache-dir": "/opt/www/roundcubemail/.composer/cache",
        "allow-plugins": {
            "roundcube/plugin-installer": true
        }
    }
}

I did not do any changes in calendar/config.inc.php (I added the DAV source via RC)

JodliDev commented 2 years ago

Hm I did a fresh installation and for me it seems to work properly. But I dont have a SoGo server to test with (but to my knowledge that should not make a difference).

Maybe SoGo is doing something weird? Have you tried if it works with other caldav providers? Just to narrow down where the problem is coming from?

Do you have a calendar that I could access and see if it does the same thing on my test server?

kevin75001 commented 2 years ago

Hi,

In my case, i've need some modification to get rize of array_merge errors (rc15 too).

I use radicale as dav server, and event added by other client than rc calendar are never show. In radical's log, i don't show any request that let me think that rc's calendar try to sync from server.

Adding event from rc's calendar are ok for me, they are sync to radicale and displayed in rc

chaos-prevails commented 2 years ago

Dear all, thanks, so there seems to be something strange with array_merge. @kevin75001 could you share what you changed with array_merge to prevent the error messages?

Because with SOGo (latest 5.6 nightly), this is what happens: 1) I create an event in RC, and it is saved in the SOGo DB, and it shows up in SOGo frontend. As long as I do not refresh the webpage, the event also shows up in RC15 calendar, and it is saved in the table caldav_events in the RC database 2) I do F5 refresh, or simply click on another view, I see the array_merge error in the logs, and the event gets deleted from the RC database (but not from the SOGo database). --> any event created in SOGo does not show up in RC --> any event created in RC is saved in SOGo, and stays there

This is the full log file including the delete:

May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Ctag indicates that calendar "23" needs update!
May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Calendar "23" needs update.
May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Syncing calendar id "23".
May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Found new event /SOGo/dav/it5@mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C/
May 12 10:53:25 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Could not perform event creation: Array
May 12 10:53:25 mail roundcube: (
May 12 10:53:25 mail roundcube:     [url] => /SOGo/dav/it5@mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C/
May 12 10:53:25 mail roundcube:     [etag] => None
May 12 10:53:25 mail roundcube: )
May 12 10:53:25 mail roundcube: 
May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Created 0 new events, updated 0 event.
May 12 10:53:25 mail roundcube: <p0d4k87c> caldav_driver: Successfully synced calendar id "23".
May 12 10:53:47 mail roundcube: <p0d4k87c> caldav_driver: Push new event to url /SOGo/dav/it5%40mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C//0BBC7F881234109BE04C8D3D55624D2E-1CB5DAFE4E2ABC8E.ics
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Ctag indicates that calendar "23" needs update!
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Calendar "23" needs update.
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Syncing calendar id "23".
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Found new event /SOGo/dav/it5@mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C/
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Found new event /SOGo/dav/it5%40mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C/0BBC7F881234109BE04C8D3D55624D2E-1CB5DAFE4E2ABC8E.ics
May 12 10:54:05 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Could not perform event creation: Array
May 12 10:54:05 mail roundcube: (
May 12 10:54:05 mail roundcube:     [url] => /SOGo/dav/it5@mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C/
May 12 10:54:05 mail roundcube:     [etag] => None
May 12 10:54:05 mail roundcube: )
May 12 10:54:05 mail roundcube: 
May 12 10:54:05 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2204
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Could not perform event creation: Array
May 12 10:54:05 mail roundcube: (
May 12 10:54:05 mail roundcube:     [url] => /SOGo/dav/it5%40mydomain.org/Calendar/2C15D9-627CCA80-13-E91B7C/0BBC7F881234109BE04C8D3D55624D2E-1CB5DAFE4E2ABC8E.ics
May 12 10:54:05 mail roundcube:     [etag] => gcs00000000
May 12 10:54:05 mail roundcube: )
May 12 10:54:05 mail roundcube: 
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Created 0 new events, updated 0 event.
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Remove event "23".
May 12 10:54:05 mail roundcube: <p0d4k87c> caldav_driver: Successfully synced calendar id "23".

(BTW this is the master from yesterday, so the 2 lines for postgres are not included (but we use mysql), so line where the error occurs should be 2206 I think)

I would like to test with a different source, and I would have chosen some free Nextcloud account. However, the signup page on nextcloud.com is currently offline, so I cannot create a test account. Is there another caldav server where I can have a limited free signup?

@JodliDev I'm happy to provide you with a test account of our SOGo 5.6 server (we are currently testing, so no relevant data on it). I will write you to the email address I found, which is most likely you. looking at the previous comment, there might really be an issue with different caldav servers? We use SOGo with RC1.3 and the faster-it caldav calendar addon (with some changes to be compatible with RC1.3) since many years, and didn't experience that issue.

kevin75001 commented 2 years ago

Hi,

I've just added :

if (!isset($update["remote_event"]) || !is_array($update["remote_event"])) $update["remote_event"] = [];

Before calling array_merge, so, this just prevent throwing the error, i think the problem is in function _sync_calendar :

    private function _sync_calendar($cal_id)
    {
        self::debug_log("Syncing calendar id \"$cal_id\".");

        $cal_sync = $this->sync_clients[$cal_id];
        $events = array();

        // Ignore recurrence events and read caldav props
        foreach($this->_load_all_events($cal_id) as $event) {
            if($event["recurrence_id"] == 0) {
                array_push($events, $event);
            }
        }

        if($updates)
        {
            list($updates, $synced_event_ids) = $updates;

            $updated_event_ids = $this->_perform_updates($updates);

...

I don't see any declaration for variable $updates

JodliDev commented 2 years ago

@kevin75001 Unfortunately that fix only masks the problem. The main problem is, that there should be new data, but there obviously isnt which is why array_merge fails. By declaring $update["remote_event"] with an empty array, you get rid of the error message, but the problem, that there is no data when there should be, remains. It should have been filled here: https://github.com/JodliDev/calendar/blob/9c6b8b4171c0ae3e61a2f81ca7c342aa0de6f803/drivers/caldav/caldav_sync.php#L201

I was now able to reproduce this issue on my end so Ill start investigating as well.

EDIT I just realised that your source seems to be altered. In the code you quoted, you are missing this line: https://github.com/JodliDev/calendar/blob/9c6b8b4171c0ae3e61a2f81ca7c342aa0de6f803/drivers/caldav/caldav_driver.php#L2114

kevin75001 commented 2 years ago

Yes, that "patch" is only to allow php to continue executing code for test purpose.

I've maybe made a wrong manipulation that have removed the line, readding it and i'm in the same case than @chaos-prevails (added events are removed when reloading calendar)

I've actually no time to track it today, so it seems related to tags

I'll do more investigation monday

JodliDev commented 2 years ago

That was an interesting hunt that took me all the way through the code base but I am confident that I found the issue:

There were special characters (in this case "@") in the username. When creating the expected url, it was urlencoded which lead to a slightly different url than the one in the server response (using "%40" instead of "@")

I am leaving the issue open for a couple days in case there were other problems that I missed

kevin75001 commented 2 years ago

Hi,

Thank you for your work.

After clonning the repo to get your change, this is not working for me, step to reproduce :

Roundcube error log show :

[16-May-2022 17:00:48 +0200]: <ad5b9226> PHP Error: iCal data parse error: Starting sabre/vobject 4.0 the children property is now protected. You should use the children() method instead in /var/www/roundcube15/plugins/libcalendaring/libvcalendar.php on line 163 (GET /roundcube15/?_task=calendar&source=6&_action=load_events&start=2022-05-16T00%3A00%3A00&end=2022-05-23T00%3A00%3A00&_=1652713248259)

[16-May-2022 17:00:48 Europe/Paris] PHP Warning: array_merge(): Argument #1 is not an array in /var/www/roundcube15/plugins/calendar/drivers/caldav/caldav_driver.php on line 2217

I've one line of each per event in my radicale server.

Roundcube sql log show :

[16-May-2022 17:00:48 +0200]: <ad5b9226> [9] DELETE FROM caldav_events
             WHERE (event_id='43' OR recurrence_id='43')
             AND calendar_id IN ('6');

Using evolution mail caldav, i can see that all my events are not deleted, it's only the mysql cache who is deleted

kevin75001 commented 2 years ago

I found the problem, i've updated the libcalendaring and now it's seems to work !

I'll do some tests tomorrow, so i think this specific issue is solved for me

Thank you for your time

chaos-prevails commented 2 years ago

hi, thanks so much! Events are now shown!

The error in the logfile however still persists (using the latest master both for libcalendaring, and calendar):

May 19 17:53:14 mail roundcube: message repeated 2 times: [ <ejkqh6o9> caldav_driver: Sync period active: Assuming calendar "65" to be in sync.]
May 19 17:53:22 mail roundcube: <ejkqh6o9> caldav_driver: Push new event to url /SOGo/dav/it5@mydomain.net/Calendar/personal//7F6D5064F155DA6B3A1DDD6B2E0B91DF-1CB5DAFE4E2ABC8E.ics
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Ctag indicates that calendar "65" needs update!
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Calendar "65" needs update.
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Syncing calendar id "65".
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Found new event /SOGo/dav/it5@mydomain.net/Calendar/personal/
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Found new event /SOGo/dav/it5@mydomain.net/Calendar/personal/7F6D5064F155DA6B3A1DDD6B2E0B91DF-1CB5DAFE4E2ABC8E.ics
May 19 17:53:25 mail roundcube: PHP Warning:  array_merge(): Expected parameter 1 to be an array, null given in /opt/www/roundcubemail/plugins/calendar/drivers/caldav/caldav_driver.php on line 2253
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Could not perform event creation: Array
May 19 17:53:25 mail roundcube: (
May 19 17:53:25 mail roundcube:     [url] => /SOGo/dav/it5@mydomain.net/Calendar/personal/
May 19 17:53:25 mail roundcube:     [etag] => None
May 19 17:53:25 mail roundcube: )
May 19 17:53:25 mail roundcube: 
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Created event "256".
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Created 1 new events, updated 0 event.
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Remove event "255".
May 19 17:53:25 mail roundcube: <ejkqh6o9> caldav_driver: Successfully synced calendar id "65".

maybe this is of cosmetical nature?