Author Topic: jQuery Calendar problem with CALDAV server  (Read 6669 times)

Offline sundansx

  • Newbie
  • *
  • Posts: 5
jQuery Calendar problem with CALDAV server
« on: November 14, 2011, 01:52:10 AM »
I am running the following:
OS: windows xp
php: 5.2.2
apache: 2.2
all under xampp

calendar plugin: 1.9
roundcube: 0.6

I am also running the radicale caldav server on this machine.  I have a calendar set up on it and am accessing it via Thunderbird/lightning and roundcube hoping they would share the calendar

I can create/edit/view/delete calendar events on lightning just fine, but roundcube is not working right.  It appears that roundcube sucessfully sends the event over, but it looks somewhat truncated and does not show in roundcube or lightning.  Also, lightning events do not show in roundcube..roundcube does not even seem to be sending a GET request when it is "replicating" the calendar.  just an empty calendar.  

here is a radicale trace log from a truncated rouncube event sent over:
Code: [Select]

PUT request at /user/me/20111113T220653Z-7HC63zk received
Request headers:
{'CONTENT_LENGTH': '230',
 'CONTENT_TYPE': 'text/calendar',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': '*/*',
 'HTTP_AUTHORIZATION': 'Basic ZGVtbzpwYXNz',
 'HTTP_HOST': 'webservervm:5232',
 'PATH_INFO': '/user/me/20111113T220653Z-7HC63zk',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '192.169.1.160',
 'REMOTE_HOST': 'webserverVM',
 'REQUEST_METHOD': 'PUT',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'webserverVM',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.2',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x00A450D0>,
 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x00C3E3B0>,
 'wsgi.input': <socket._fileobject object at 0x00DE2AF0>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /user/me/20111113T220653Z-7HC63zk
Request content:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Roundcube Webmail//NONSGML Calendar//EN
X-WR-Timezone: Europe/London
BEGIN:VEVENT
DTSTART:19700101T000000Z
X-DB-UID:@sundanse@sundanse.net
UID:20111113T220653Z-7HC63zk
END:VEVENT
END:VCALENDAR


Here is a thunderbird event that shows up:
Code: [Select]

PUT request at /user/me/599e357e-02a9-4071-aa1b-f467838b14fe.ics received
Request headers:
{'CONTENT_LENGTH': '868',
 'CONTENT_TYPE': 'text/calendar; charset=utf-8',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/xml',
 'HTTP_ACCEPT_CHARSET': 'utf-8,*;q=0.1',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': 'webservervm:5232',
 'HTTP_IF_NONE_MATCH': '*',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105
Thunderbird/8.0 Lightning/1.0',
 'PATH_INFO': '/user/me/599e357e-02a9-4071-aa1b-f467838b14fe.ics',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '192.169.1.69',
 'REMOTE_HOST': 'Graphix',
 'REQUEST_METHOD': 'PUT',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'webserverVM',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.2',
 'wsgi.errors': ', mode 'w' at 0x00A450D0>,
 'wsgi.file_wrapper': ,
 'wsgi.input': ,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
Sanitized path: /user/me/599e357e-02a9-4071-aa1b-f467838b14fe.ics
Request content:
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20111114T060434Z
LAST-MODIFIED:20111114T060448Z
DTSTAMP:20111114T060448Z
UID:599e357e-02a9-4071-aa1b-f467838b14fe
SUMMARY:mozevent2
DTSTART;TZID=America/Los_Angeles:20111119T231500
DTEND;TZID=America/Los_Angeles:20111119T234500
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT15M
DESCRIPTION:Default Mozilla Description
END:VALARM
END:VEVENT
END:VCALENDAR


Anyone have an idea what is going wrong?  Both clients are set to the same url for the caldav server.
« Last Edit: November 14, 2011, 01:56:23 AM by sundansx »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
jQuery Calendar problem with CALDAV server
« Reply #1 on: November 14, 2011, 12:18:21 PM »
Goto Calendar->Settings and define your CalDAV credentials. Make sure to have the appropriate authentication method.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sundansx

  • Newbie
  • *
  • Posts: 5
jQuery Calendar problem with CALDAV server
« Reply #2 on: November 14, 2011, 09:33:08 PM »
I am not using credentials on this server.  Lightning connects without specifying any credentials.

First I want to understand what this part of the calendar plugin is supposed to do...I thought it was a caldav client that talks to a caldav server to get calendar info.  Is this correct?

Also, I tried out your demo on mail4us.net and it appears to be setup already to work with a caldav server you have on your site.  It seems to have similar problems, I cannot create an event on it.  It does not seem to have any events present, either.  Is the caldav backend/server running on the demo system?

thanks for your help.
« Last Edit: November 14, 2011, 10:24:03 PM by sundansx »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
jQuery Calendar problem with CALDAV server
« Reply #3 on: November 14, 2011, 11:59:55 PM »
Lightning needs user/password as well. It is a caldav client. Once correct configured it works either locally on the database or with a CalDAV (Google Calendar, Davical).

The demo works. It looks like a demo user has specified invalid CalDAV credentials. I've set the demo now to work on database by default.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline sundansx

  • Newbie
  • *
  • Posts: 5
jQuery Calendar problem with CALDAV server
« Reply #4 on: November 15, 2011, 02:53:20 AM »
Rosali,
Thanks for the help.  I got it working..it was being caused by an oversight that I was not aware of.  My database was outdated and there was no events_caldav.  
for others with the same problem:
I ran the test script that the config file hinted at:  http:///?_task=dummy&_action=plugin.calendar_tests
It pointed to a database problem, so I followed its advice and dropped all my events tables and ran the sql script in the calendar folder.  I also dropped all other tables and ran the roundcube init script (upgrade wouldn't work for me..maybe I was jumping too far - 0.4 to 0.6)
thanks again.

Update:  This calendar rocks the house.  very well done.
« Last Edit: November 15, 2011, 02:56:00 AM by sundansx »