Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed event still visible #1008

Open
KolbeinNL opened this issue May 3, 2019 · 13 comments
Open

Removed event still visible #1008

KolbeinNL opened this issue May 3, 2019 · 13 comments

Comments

@KolbeinNL
Copy link

KolbeinNL commented May 3, 2019

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:

<c:calendar-query xmlns:c="urn:ietf:params:xml:ns:caldav"><d:prop xmlns:d="DAV:"><d:getetag/><c:calendar-data/></d:prop><c:filter><c:comp-filter name="VCALENDAR"><c:comp-filter name="VEVENT"><c:time-range start="20190428T220000Z" end="20190609T220000Z"/></c:comp-filter></c:comp-filter></c:filter></c:calendar-query>

<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/calendars/kolbein/thijsthiessenskolbeinnl/1556887101.R34.ics</d:href><d:propstat><d:prop><d:getetag>"6017e584aeaf822e27f20a6802426bdd"</d:getetag>cal:calendar-dataBEGIN: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
</cal:calendar-data></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

@Julian1998
Copy link
Contributor

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

@KolbeinNL
Copy link
Author

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

@Julian1998
Copy link
Contributor

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

@KolbeinNL
Copy link
Author

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":"[email protected]","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
Copy link
Author

KolbeinNL commented May 3, 2019

But that is something with PUT

@Julian1998
Copy link
Contributor

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
Copy link
Author

Anything that I can do?

@Julian1998
Copy link
Contributor

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

@KolbeinNL
Copy link
Author

KolbeinNL commented May 4, 2019

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.

<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/dav/calendars/kolbein/thijsthiessenskolbeinnl/1556887101.R34.ics</d:href><d:propstat><d:prop><d:getetag>"6017e584aeaf822e27f20a6802426bdd"</d:getetag>cal:calendar-dataBEGIN: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
</cal:calendar-data></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

@KolbeinNL
Copy link
Author

KolbeinNL commented May 16, 2019

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
Copy link
Contributor

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

@Julian1998
Copy link
Contributor

But let me have a quick look tomorrow

@karakayasemi
Copy link

This issue may resolved with #964 . @KolbeinNL would you test this issue with master branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants