Personal tools

Calendar:GDATA Provider

From MozillaWiki

Jump to: navigation, search

Contents

What is the GDATA Provider?

The Google Data Protocol is a REST-inspired technology for reading from, writing to, and modifying Google services via the web. Many services at Google, including Google Calendar, provide external access to data and functionality through APIs that utilize the Google Data Protocol. The GDATA Provider is an adapter that connects the internals of Mozilla's Lightning calendar add-on to Google Calendar RESTful data services. This allows you to view, edit and manipulate Google calendars within Lightning.

Disclaimer

This provider enables write support to Google Calendar. Although unlikely, it is possible that you could lose (parts of) your data here. Neither the author nor Mozilla can be held responsible for that.

You can find a German translation of this page at support.mozillamessaging.com. - Eine Übersetzung dieser Seite ins Deutsche finden Sie auf support.mozillamessaging.com.

Getting the Provider

Downloading

You can obtain the provider from addons.mozilla.org. It is available for Sunbird and Lightning.

Notes:

  • It is recommended to use the latest version of Sunbird or Lightning together with the latest Provider for Google Calendar version.
  • If you are using the latest nightly versions of Sunbird/Lightning, please use the corresponding version from ftp.mozilla.org (currently [March 2011] ftp://ftp.mozilla.org/pub/calendar/lightning/nightly/latest-comm-1.9.2/ then the xpi subfolder corresponding to your platform).

Building from Source

If you want to build your own copy of the provider from the comm-central tree, all you need to do is follow the build instructions for Sunbird/Lightning. Once you have compiled, the resulting extension should be at obj-dir/mozilla/dist/xpi-stage/gdata-provider.xpi

Accessing your Calendar

To access your calendar data, you need to retrieve your private XML URL from the Google Calendar UI. If you are not sure how, follow these steps:

  1. Open your Google Calendar
  2. Click on the Settings link located in the box at the right of the page.
  3. Click on the calendar you want to use with Thunderbird Lightning or Sunbird.
  4. Click on either of the two XML buttons shown at the bottom.

Authentication is always done securely via https, your password is not sent in clear. However, an Authentication Token is sent with each request that can be used to further manipulate your calendar. To ensure full privacy, be sure to change the URL from http://.. to https://...

Note that the provider does not directly use your private url. The Calendar is still accessible when you reset your private url.

You may now use this url as the Location when clicking File > New > Calendar > On the Network > Google Calendar in Sunbird/Lightning. There is also a graphical tutorial available at bfish.xaedalus.net.

Bugs and Limitations

Before reporting a bug, carefully check this list to see if the issue you are having is not a known limitation. The list is in FAQ format to make it easier to find your issue. If your question was not answered here, please discuss it on the newsgroup. If you believe you have found a bug, please file it in bugzilla

Enabling calendar.debug.log

This option is useful for more verbose logging to diagnose problems you are having. It is also a good thing to look at before posting on the discussion group:

  • Open your application preferences (Tools or Edit Menu)
  • Select the "Advanced" icon at the top.
  • Click on the "General" tab, below the icons
  • Select "Advanced Configuration"
  • Right Click on an empty space in the list of preferences
  • Select New > Boolean
  • Enter "calendar.debug.log" as the preference name
  • Pick "true" as the Boolean value.

Now you have enabled the preference. If you were experiencing a problem, you will get the most debug messages if you restart the application, then do whatever you were doing again until you experience the issue. Then check out the error console ("Tools" menu).

If you are testing CalDAV support, you should do the same steps above for the "calendar.debug.log.verbose" preference.

I want to stay up to date on all GData Provider bugs!

Nothing easier than that. In your bugzilla Email preferences, you can set up a list of "users" to watch. Enter the gdata-provider@calendar.bugs email address, and you will receive bugmail on each update to GData Provider bugs and on new bugs.

You get to them as follows:

  1. Browse to https://bugzilla.mozilla.org/
  2. Make sure that you are logged-in (your email address appears near top right). If necessary, log in with your Bugzilla email-address-of-record and the corresponding password. If you don't yet have a Bugzilla account, get one (price: $0.00) by clicking the rightmost icon, Open a New Account.
  3. Once you are logged in, click the rightmost icon at bugzilla.mozilla.org: it says User Preferences.
  4. On the top of the page, there are several tabs. Click the one which says Email Preferences.
Then, scroll to the bottom of that page. Next to the line which says Add users to my watch list (comma-separated list) there is an input box. First type gdata-provider@calendar.bugs into that box, then double-check that you made no typo, and finally click the Submit changes button. From then on, you will get bugmail according to your mail preferences (i.e. the array of checkboxes on that page) for every gdata-provider bug created or changed.

Calendar Access

Why should I use the Provider, and not access via CalDAV?

The Provider predates Google Calendar's CalDAV support and was initially recommended because it was more stable. However, CalDAV support has improved with time and now offers a pretty complete Google Calendar experience, including reminder support (Lightning reminders synced via CalDAV appear as pop-ups in the web interface and as notifications in the Android app).

GDATA does offer some extra functionality, namely the ability to set up email or SMS reminders, and may be easier to configure since there's no need to enter complex calendar URLs.

I cannot access my calendar at all!

Now this is very general. First things first: Do you see any error console messages? If not, please enable calendar.debug.log in the advanced config editor. See above for how to do that. You should be getting more debug messages now.

Are you using a calendar nightly? (i.e 1.0pre) If so, you must use a mercurial compiled version of the gdata provider, not the official release. This is also described above in this FAQ.

I want to be able to pick my calendars from a list, is there a way to do so?

Not currently. Progress on this is being tracked in bug 378873.

I have publicly shared my calendar. I don't want to enter my password each time!

  • For public calendars you don't need the Provider for Google Calendar. Just use the standard iCalendar Provider and the ICS feed from Google. If you want to change a public calendar, there is no way around entering your password.
  • If you can afford to "tell" them your passwords (i.e., not when using them at some internet café), Thunderbird, SeaMonkey and Sunbird can all remember your passwords by means of the Password Manager. Just check the appropriate checkbox in the popup asking for your password before you okay it.
  • If you have used the Password Manager in the past and want to make the program forget one or more passwords so that they will be asked again next time (and so that you can change them), you can; here's how:
    • Thunderbird: Tools → Options → Security → Passwords → Saved Passwords
    • SeaMonkey: Edit → Preferences → Privacy & Security → Passwords → Manage Stored Passwords
    • Sunbird: Edit → Preferences → Advanced → Passwords → View saved passwords

I want to access a friend's calendar I have access too, but I am asked for a password!

No problem! As long as you have this calendar added in the Google Calendar web interface, just enter the email address and password for your own Google account.

Missing Features

Why can't I configure any options in the Extension Manager?

There are currently not enough options to warrant an options window. There are some advanced preferences:

calendar.google.useHTTPMethodOverride = true Instead of using PUT and DELETE methods, use POST and GET with the X-HTTP-Method-Override header. This is good for proxies and since it doesn't harm non-proxies, it defaults to true.

calendar.google.alarmClosest = true Alarm support: Use either the alarm closest (true) or farthest away (false) from the event as the alarm displayed in Sunbird/Lightning.

calendar.google.sendEventNotifications = true When set to true, invitations are sent out to attendees on event modifications.

calendar.google.enableAttendees = false When set to false, attendees are disabled. This might be needed if you experience problems when accepting invitations.

calendar.google.sendEmailNotifications = false Setting this to true allows selecting a Google Calendar when accepting an invitation you received via email. WARNING: Enabling this option may cause you to unknowingly spam all attendees with an extra invitation! Only enable this option if you know what you are doing.

Can I create or view comments made within the Google Calendar Interface?

Not currently. Progress on this is being tracked in bug 362653

I want to be able to edit my calendars while offline!

Version 0.9 of lightning currently allows only read-only access to the calendar events while offline.

You might want to monitor progress of bug 380060 to be informed on any progress on editing during offline mode feature.

Event Interaction

I have set a category, but when changing the event it vanishes

This could be caused due to bug 461995. I hope this will be fixed in the next version. (VERIFIED DUPLICATE of bug 460041 for "Provider: WCAP", which was VERIFIED FIXED 2008-12-01)

I want to modify an Event but nothing happens. What am I doing wrong?

Is that you tried to set the event status to Canceled. Google uses this event status to mark deleted events. If the provider were to allow this, you would be losing your events at least every week.

Next check if you or somebody else is modifying the event from another client (which may also be the Google Calendar UI). The error mentioned below will contain something about Status Code: 409 Conflict. This is a known issue. For now, try switching to a different view (that also contains the event you want to modify) and then retry editing the event. See bug 362645 for details.

After creating a recurring event, I am having problems with alarms. Why?

Aside from the fact that there is no standardized scheme to store dismissing and snoozing alarms, Google doesn't allow setting certain properties on recurring events. This is especially the case for shared calendars. See bug bug 424185 (RESOLVED FIXED 2008-09-17) for details.

Why do all events I create or edit through Sunbird/Lightning have wrong times?

Is your local timezone set up correctly in Sunbird/Lightning preferences? If not, all events you edit will have the first timezone with the same offset as the original timezone it was set in. Also, created events will use the timezone that was originally set in your timezones preference.

Also if you are using windows, make sure you have all timezone upgrades installed.

Why can't I create tasks on a Google Calendar?

Google does have an API for Tasks now, this is mostly waiting on the author to find time to do it right. The API Google provides for tasks functions a bit differently than their calendar API and one of the hurdles is getting Google to allow more requests for the author's API key.

Another option would be to get Google to implement this in their CalDAV interface, see google caldav issue 36. On the Mozilla side, bug 493389 is filed to take care.

Please star the Google issues to vote for them. DO NOT post "+1" style comments however, this only spams everyone that has voted for the issue.

Attendees

I received an invitation from a friend. When trying to accept, my Google Calendars are not in the select calendar dialog, or no dialog is shown

Accepting an invitation onto your Google Calendar can cause extra invitations being sent out to each attendee. Due to some Google Calendar limitations when adding invitations to your calendar its impossible to allow this in a way that new users will not shoot themselves in the foot.

If you know what you are doing, you can still re-enable this behavior. See the FAQ question regarding options.

After accepting an invitation, the attendees all get an additional invitation from me

This is bug 400808. A workaround is to set calendar.google.sendEventNotifications to false in the advanced config editor, or to not handle event invitations via lightning. Note that setting this preference inhibits all sending of event notifications. (Update: DUPLICATE of bug 407961 which is FIXED since 2008-10-10)

Alarms

What should I keep in mind while using alarms with the provider?

The provider will only alert alarms of type popup. Depending on the setting of the (boolean) property calendar.google.alarmClosest, it will read either the popup alarm closest to the event (true) or furthest away (false). To avoid confusion, be sure you set only one alarm with type popup. All other alarm types will not be touched by the provider.

I have set some default reminders in the Google UI, but they don't show up on new events?

As it might be easy to tell Google to use those default reminders, it requires UI additions to sunbird/lightning. I would like to concentrate on backend functionality before I add such UI extensions. If you would like this functionality, feel free to file an enhancement bug in bugzilla. (Remember to search if such a bug exists first).

I set an alarm on an event but after looking at the event again, the alarm has a totally different value!

Since Google supports multiple alarms and sunbird/lightning only supports one alarm, its hard to find a good way to map between the possible alarms. The provider will read the alarm either closest to or furthest away from the event. If you change a popup alarm in sunbird/lightning, and another popup alarm gets closer to (or further away from) the event, then the provider will read the other alarm.

Another possibility is that you have set an alarm value that is not supported by Google. Currently, Google only accepts values between 5 minutes and 4 weeks before the event starts.

I want to set more than one alarm, but the Event dialog only shows one!

Since Sunbird/Lightning also does not support multiple alarms, its very hard to do so without massive UI and calendar backend changes. I'd like to fix this in calendar rather than in the provider. See bug 353492 for multiple alarms support. (RESOLVED FIXED since 2009-04-02)