-
Notifications
You must be signed in to change notification settings - Fork 291
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
Recursisve events expansion returns error 500 #695
Comments
Newer sabre/vobject versions (the lib that parses icalendar) have become more strict in terms of what kind of data they accept. In the past it ignored a lot of problems that it shouldn't have. The issue in this case is that you have a broken iCalendar object in your database. vobject tries to parse it to expand it, but can't because the object is invalid. If you can find out in your db which the broken iCalendar object might be, deleting it will solve this problem. It's not a very easy solution, I know... |
@evert I just tried the second query on an empty calendar (thus without any "broken ICalendar object") and the result is still an error 500. This also seems to affect the ics-export plugin when the I assume |
@lbeziaud I have setup UTC as timezone for the calendar but it does not help that much as I have now another error. <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"> In bold, I have added some debug information to help. switch (strtoupper($line)) { |
Well, I got it! I have made the same kind of patch as described in #697 (added bold code) function calendarQueryReport($report) {
|
@deboutv That will at least make the export work but the problem is that the events will now all be in |
The problem is that the underlying iCalendar data needs to be repaired for sabre/vobject to start accepting it. This is unfortunate. Sabre/dav does come with a repair script in /vendor/bin/vobject but it repairs files not the database directly :( anyway let me know if you need help for this. I'm closing this ticket for now for housekeeping but opening it up again is super easy. |
The following request without expand is working fine.
REPORT /cal.php/calendars/user/default/ HTTP/1.1
...
<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:prop>
<D:getetag />
<C:calendar-data />
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="CATEGORIES"><C:text-match match-type="equals">Birthday</C:text-match></C:prop-filter>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
The following request with expand returns an 500 error.
REPORT /cal.php/calendars/user/default/ HTTP/1.1
...
<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<D:prop>
<D:getetag />
<C:calendar-data>
<C:expand start="20170618T000000Z" end="20170620T000000Z" />
</C:calendar-data>
</D:prop>
<C:filter>
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VEVENT">
<C:prop-filter name="CATEGORIES"><C:text-match match-type="equals">Birthday</C:text-match></C:prop-filter>
</C:comp-filter>
</C:comp-filter>
</C:filter>
</C:calendar-query>
Here is the error returned:
HTTP/1.1 500 Internal Server Error
Date: Sun, 18 Jun 2017 13:37:18 GMT
Server: Apache/2.4.18 (Ubuntu)
Set-Cookie: PHPSESSID=g93nsk5ki97o2acctvg4jlj1p1; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Sabre-Version: 3.1.3
Content-Length: 274
Connection: close
Content-Type: application/xml; charset=utf-8
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:sabredav-version>3.1.3</s:sabredav-version>
<s:exception>Sabre\VObject\EofException</s:exception>
<s:message>End of document reached prematurely</s:message>
</d:error>
Older version of baikal was working fine.
The text was updated successfully, but these errors were encountered: