owncloud / calendar

Calendar app for ownCloud
GNU Affero General Public License v3.0
121 stars 43 forks source link

Removed event still visible #1008

Open KolbeinNL opened 5 years ago

KolbeinNL commented 5 years ago

Steps to reproduce

  1. Start KOrganize or Thunderbird Lightning
  2. Add a recurring event
  3. notice how the event is visible in owncloud
  4. remove single occurrence in KOrganize or Thunderbird
  5. Notice how the event is correctly displayed in both KOrganize and Thunderbird but NOT in owncloud
  6. Note: EXDATE;VALUE=DATE:20190510 and EXDATE;VALUE=DATE:20190524 in the output below

Expected behaviour

The exception event should not be visible

Actual behaviour

The exception event is still visible in owncloud

Server configuration

Operating system:

Ubuntu

Web server:

Apache

Database:

Postgres

PHP version: 7.0

ownCloud version: (see your admin page)

10.0.10

Calendar version: (see the apps page)

1.6.2

Updated from an older installed version or fresh install:

Fresh

Signing status (ownCloud 9.0 and above):

Login as admin user into your cloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your instance's installation folder

ownCloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your instance's installation folder

or 

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using external storage, if yes which one: local/smb/sftp/... no

Are you using encryption: yes/no

no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

no

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your instance's installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';

Be sure to replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

CalDAV-clients:

Logs

Web server error log

Insert your webserver log here

Log file (data/owncloud.log)

Insert your ownCloud.log file here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
  1. new recurring appointment

Schermafdruk van 2019-05-03 15-55-08

  1. view on owncloud

Schermafdruk van 2019-05-03 16-05-00

  1. Remove single occurrence

Schermafdruk van 2019-05-03 16-03-45

  1. Remove single occurence

Schermafdruk van 2019-05-03 16-04-04

  1. See that occurrence is not removed

Schermafdruk van 2019-05-03 16-05-00

Event data after removing the occurrence:

/remote.php/dav/calendars/kolbein/thijsthiessenskolbeinnl/1556887101.R34.ics"6017e584aeaf822e27f20a6802426bdd"BEGIN:VCALENDAR PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN VERSION:2.0 X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0 BEGIN:VTIMEZONE TZID:Europe/Amsterdam BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0000 TZOFFSETTO:+0100 DTSTART:19761231T230000 RDATE;VALUE=DATE-TIME:19761231T230000 END:STANDARD BEGIN:DAYLIGHT TZNAME:CEST TZOFFSETFROM:+0100 TZOFFSETTO:+0200 DTSTART:19810329T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 END:DAYLIGHT BEGIN:DAYLIGHT TZNAME:CEST TZOFFSETFROM:+0100 TZOFFSETTO:+0200 DTSTART:19770403T020000 RDATE;VALUE=DATE-TIME:19770403T020000 RDATE;VALUE=DATE-TIME:19780402T020000 RDATE;VALUE=DATE-TIME:19790401T020000 RDATE;VALUE=DATE-TIME:19800406T020000 END:DAYLIGHT BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19790930T030000 RRULE:FREQ=YEARLY;UNTIL=19961027T030000;COUNT=17;BYDAY=-1SU;BYMONTH=9 END:STANDARD BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19971026T030000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 END:STANDARD BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19770925T030000 RDATE;VALUE=DATE-TIME:19770925T030000 RDATE;VALUE=DATE-TIME:19781001T030000 RDATE;VALUE=DATE-TIME:19950924T030000 END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTAMP:20190503T140354Z CREATED:20190503T123703Z UID:5d34d06e-30c0-405f-a77e-20feeaf10505 SEQUENCE:5 LAST-MODIFIED:20190503T140354Z SUMMARY:test RRULE:FREQ=WEEKLY;BYDAY=MO,FR EXDATE;VALUE=DATE:20190510 EXDATE;VALUE=DATE:20190524 DTSTART;TZID=Europe/Amsterdam:20190506T181500 DTEND;TZID=Europe/Amsterdam:20190506T191500 TRANSP:OPAQUE END:VEVENT END:VCALENDAR HTTP/1.1 200 OK
Julian1998 commented 5 years ago

Can you please upload your event data? Or at least some reproducing test data before and after the remove of a single occurrence

KolbeinNL commented 5 years ago

Please see the update ticket and the network logging with xml data

Julian1998 commented 5 years ago

Any errors in the server log or browser console? Looks weird. Exdate props are set correctly

KolbeinNL commented 5 years ago

Console and owncloud log stays empty . I have a tail -f on data/owncloud.log. No errors. I could see this however further up..

{"reqId":"JaRNx4SIklMqtKFJqEY3","level":4,"time":"2019-05-03T14:30:08+00:00","remoteAddr":"185.65.134.166","user":"jessica.vanpanhuis@fijnthuiszorg.nl","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/calendars\/jessica.vanpanhuis%40fijnthuiszorg.nl\/daviddrentjefijnthuiszorgnl_shared_by_simone.wassink%40fijnthuiszorg.nl\/779f5fff-38fa-47c9-b519-6629fdd7eab7.ics","message":"Exception: This recurrence rule does not generate any valid instances: {\"Exception\":\"Sabre\\VObject\\Recur\\NoInstancesException\",\"Message\":\"This recurrence rule does not generate any valid instances\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/owncloud\\/apps\\/dav\\/lib\\/CalDAV\\/CalDavBackend.php(1546): Sabre\\VObject\\Recur\\EventIterator->__construct(Object(Sabre\\VObject\\Component\\VCalendar), '779f5fff-38fa-4...')\n#1 \\/var\\/www\\/owncloud\\/apps\\/dav\\/lib\\/CalDAV\\/CalDavBackend.php(867): OCA\\DAV\\CalDAV\\CalDavBackend->getDenormalizedData('BEGIN:VCALENDAR...')\n#2 \\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/CalDAV\\/CalendarObject.php(106): OCA\\DAV\\CalDAV\\CalDavBackend->updateCalendarObject(80, '779f5fff-38fa-4...', 'BEGIN:VCALENDAR...')\n#3 \\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1129): Sabre\\CalDAV\\CalendarObject->put('BEGIN:VCALENDAR...')\n#4 \\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(513): Sabre\\DAV\\Server->updateFile('calendars\\/jessi...', 'BEGIN:VCALENDAR...', NULL)\n#5 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/event\\/lib\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#7 \\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#8 \\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#9 \\/var\\/www\\/owncloud\\/apps\\/dav\\/lib\\/Server.php(298): Sabre\\DAV\\Server->exec()\n#10 \\/var\\/www\\/owncloud\\/apps\\/dav\\/appinfo\\/v2\\/remote.php(31): OCA\\DAV\\Server->exec()\n#11 \\/var\\/www\\/owncloud\\/remote.php(165): require_once('\\/var\\/www\\/ownclo...')\n#12 {main}\",\"File\":\"\\/var\\/www\\/owncloud\\/lib\\/composer\\/sabre\\/vobject\\/lib\\/Recur\\/EventIterator.php\",\"Line\":203}"}

KolbeinNL commented 5 years ago

But that is something with PUT

Julian1998 commented 5 years ago

That's interesting... seems like RRULE:FREQ=YEARLY;UNTIL=19961027T030000;COUNT=17;BYDAY=-1SU;BYMONTH=9 throws a parser error.... I will have a deeper look into the ical specs when I got time

KolbeinNL commented 5 years ago

Anything that I can do?

Julian1998 commented 5 years ago

You are always welcome to fix it since we are a community driven project anyway :P

KolbeinNL commented 5 years ago

Ok. I have no dev environment setup or anything. Don't know how difficult such a thing is. I'll notice by the way that in thunderbird it is working correct.

<?xml version="1.0"?>

/remote.php/dav/calendars/kolbein/thijsthiessenskolbeinnl/1556887101.R34.ics"6017e584aeaf822e27f20a6802426bdd"BEGIN:VCALENDAR PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN VERSION:2.0 X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0 BEGIN:VTIMEZONE TZID:Europe/Amsterdam BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0000 TZOFFSETTO:+0100 DTSTART:19761231T230000 RDATE;VALUE=DATE-TIME:19761231T230000 END:STANDARD BEGIN:DAYLIGHT TZNAME:CEST TZOFFSETFROM:+0100 TZOFFSETTO:+0200 DTSTART:19810329T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 END:DAYLIGHT BEGIN:DAYLIGHT TZNAME:CEST TZOFFSETFROM:+0100 TZOFFSETTO:+0200 DTSTART:19770403T020000 RDATE;VALUE=DATE-TIME:19770403T020000 RDATE;VALUE=DATE-TIME:19780402T020000 RDATE;VALUE=DATE-TIME:19790401T020000 RDATE;VALUE=DATE-TIME:19800406T020000 END:DAYLIGHT BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19790930T030000 RRULE:FREQ=YEARLY;UNTIL=19961027T030000;COUNT=17;BYDAY=-1SU;BYMONTH=9 END:STANDARD BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19971026T030000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 END:STANDARD BEGIN:STANDARD TZNAME:CET TZOFFSETFROM:+0200 TZOFFSETTO:+0100 DTSTART:19770925T030000 RDATE;VALUE=DATE-TIME:19770925T030000 RDATE;VALUE=DATE-TIME:19781001T030000 RDATE;VALUE=DATE-TIME:19950924T030000 END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTAMP:20190503T140354Z CREATED:20190503T123703Z UID:5d34d06e-30c0-405f-a77e-20feeaf10505 SEQUENCE:5 LAST-MODIFIED:20190503T140354Z SUMMARY:test RRULE:FREQ=WEEKLY;BYDAY=MO,FR EXDATE;VALUE=DATE:20190510 EXDATE;VALUE=DATE:20190524 DTSTART;TZID=Europe/Amsterdam:20190506T181500 DTEND;TZID=Europe/Amsterdam:20190506T191500 TRANSP:OPAQUE END:VEVENT END:VCALENDAR HTTP/1.1 200 OK
KolbeinNL commented 5 years ago

Hi Julian,

I'm busy setting up dev environment. Do you know where in the calendar app can I find the code that displays the calendar Items based on the recurrence rule?

https://github.com/owncloud/calendar/blob/master/js/app/models/veventModel.js?

I see in the following code:

while ((next = iterator.next())) { const occurrence = iCalEvent.getOccurrenceDetails(next);

                        if (occurrence.endDate.compare(iCalStart) < 0) {
                            continue;
                        }
                        if (occurrence.startDate.compare(iCalEnd) > 0) {
                            break;
                        }

                        const dtstart = context.convertTz(occurrence.startDate, timezone.jCal);
                        const dtend = context.convertTz(occurrence.endDate, timezone.jCal);
                        const fcEvent = FcEvent(iface, occurrence.item.component, dtstart, dtend);

                        fcEvents.push(fcEvent);

}

Looks like the exdate part is ignored?!

Julian1998 commented 5 years ago

As far as I know our dependency fullcalender is responsible for all the rendering stuff

Julian1998 commented 5 years ago

But let me have a quick look tomorrow

karakayasemi commented 5 years ago

This issue may resolved with https://github.com/owncloud/calendar/pull/964 . @KolbeinNL would you test this issue with master branch?