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

iCal feed doesn't work with Google Calendar #9

Closed
swiharta opened this issue Nov 19, 2011 · 2 comments
Closed

iCal feed doesn't work with Google Calendar #9

swiharta opened this issue Nov 19, 2011 · 2 comments

Comments

@swiharta
Copy link

Google Calendar loads the events.ics file created using this plugin if I save it and import the file. However, when I try using the "Add by URL" feature in Google Calendar, it won't load the calendar generated using this plugin. The same URL loads flawlessly into my iPhone's Calendar.

I initially got an error message The address that you provided did not contain a calendar in a valid iCal or GData format. Noting other examples, I changed the Content-Disposition header from attachment to inline, and now rather than give an error message, it just keeps displaying the "Importing calendar from url..." message, and the calendar does at least show up in my "Other Calendars" area, but none of the events get passed in correctly.

Running my file through a couple iCal validators, again the events.ics file saved and uploaded validates perfectly. But when I try to give it the URL of the iCal feed, this validator gives me this error:

Your calendar is using an invalid newline format. Make sure to use \r\n to end lines rather than just \n

Sorry, your calendar could not be parsed.
Error:  Error was: Error at line 1: Expected [-3], read [10]
Cause:  
Context for line 1:
1:  
2:  
3:  
4:  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
5:  
6:  <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"
7:  xml:lang="en-us" lang="en-us">

...and this validator gives this error:

expecting "BEGIN", found '

Viewing my events.ics file in a text editor, there is no ' character before BEGIN, and each line ends with CRLF. I've tried changing my urls.py to include the filename events.ics, trying with Content-Disposition header set to attachment or inline with no luck.

I wonder what your results have been? Any help is much appreciated.

@maiksprenger
Copy link
Collaborator

I'm afraid I'm not able to maintain this plugin due to lack of time
and usage of Django in general. I'll pull in any merge requests that
look reasonable, but can't check them, so I suggest a fork.

As for the bug: I suggest investigating the output of the view, and of
vObject - paying special attention to newlines (\r\n vs. \n).

@swiharta
Copy link
Author

Turns out there is nothing wrong with the plugin, I forgot that I have a middleware that enforces login_required for every view not specified in a list of exemptions, and I forgot to add the iCal feed urls to this list. Thanks again for the great plugin!

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

2 participants