I'm trying to subscribe to a View iCal feed I've created following the documentation but I'm unable to make it work.
The View display for the feed seems to be well configured and if I point to the link I can successfully download the .ics file.
When I try to subscribe to this feed from Google Calendar by using the Add by URL option I get the following error: "The address that you provided did not contain a calendar in a valid iCal or GData format.".
I've tried adding the webcal:// and the http:// and I get this error everytime. Sometimes it seems like the calendar is being added but then no events are being displayed on the calendar (even if they are inside the .ics file, see issue attachment).
Has anyone been able to subscribe successfully from Google Calendar?
Any advise will be appreciated. Thanks!
Comment | File | Size | Author |
---|---|---|---|
export.zip | 568 bytes | brian.gora@gmail.com |
Comments
Comment #2
coredumperror CreditAttribution: coredumperror commentedLooking at the export.ics file you included in that zip, there's some extra blank lines at the top of the file. This makes the file incompatible with the iCal spec, since
BEGING:VCALENDAR
must be at the very beginning of the file. This kind of thing is usually caused by another module you've got installed on your site that doesn't follow best practices with regards to the?>
tag at the end of its files.What you'll want to do is go through the module code installed in your site (usually in the
sites/all/modules
folder) to find all the places where a?>
tag appears at the end of a .module, .install, .inc, or .php file (not .tpl.php files, though), and erase that tag. I would guess that there's probably only one file with this issue, and it'll have 2 blank lines after it.Comment #3
brian.gora@gmail.com CreditAttribution: brian.gora@gmail.com commentedThanks for your reply coredumperror!! You were right, I found a module which had the ?> tag and a blank line below. After removing the closing tag the amount of blank lines at the beginning of the file went from 2 to 1 so it seems that there's still something wrong elsewhere. I've checked all modules with a regex search and the template.php but they all look okay.
You said that template files .tpl.php couldn't cause this, right?
Do you think of anything else that could be generating the remaining blank line?
Comment #4
coredumperror CreditAttribution: coredumperror commentedTemplate files shouldn't cause it... but I'm not actually 100% sure that they can't. It's possible that there's a non-template file with a .php extension, though. I'd suggest doing that regex search on all the files in your
sites
folder (that will exclude everything that's part of Drupal core).If that doesn't bear fruit, I'm honestly not sure what to do. Dangling PHP closing tags are the only reason I've ever heard of for extra blank lines like that. Your best bet would probably be to disable every contrib module that's not absolutely needed for the iCal export, then try again. If the blank line is gone, re-enable modules one at a time until it comes back, and you'll find your culprit.
Don't forget to look in sites/all/libraries, too. That could be a source of hanging closing tags.
Comment #5
brian.gora@gmail.com CreditAttribution: brian.gora@gmail.com commentedThank you for your suggestion, I'll perform another regex search on all sites folder files. Then, depending on my findings, I might start disabling contrib modules that are not needed for the iCal export and try.
Thanks again :)
Comment #6
coredumperror CreditAttribution: coredumperror commentedAlright, I'm going to close this issue. If you continue having problems, you might have some luck searching google for "PHP headers already sent" (without the quotes). That's the error one usually sees when extra whitespace is being barfed onto their output. You're not seeing the error because Date iCal doesn't send any headers in its output.