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

Google Calendar - htmlLink not always defined #2844

Closed
bensinclair opened this issue Aug 31, 2015 · 6 comments
Closed

Google Calendar - htmlLink not always defined #2844

bensinclair opened this issue Aug 31, 2015 · 6 comments
Milestone

Comments

@bensinclair
Copy link

Over the weekend I started getting the following error.

screen shot 2015-08-31 at 11 20 21 am

It's within the injectQsComponent function. It appears not all items in a Google Calendar events array have a htmlLink key.

Here's an example:

  {
   "kind": "calendar#event",
   "etag": "\"2881697643358000\"",
   "id": "xxxxxxxxxx",
   "status": "confirmed",
   "updated": "2015-08-29T11:47:01.679Z",
   "start": {
    "dateTime": "2015-09-03T04:30:00-04:00",
    "timeZone": "Australia/Sydney"
   },
   "end": {
    "dateTime": "2015-09-03T05:15:00-04:00",
    "timeZone": "Australia/Sydney"
   },
   "visibility": "private",
   "iCalUID": "xxxxxxxxxx@google.com"
  }

Doesn't happen on all calendars. Would just be a case of checking if entry.htmlLink is defined. To fix temporarily this is what I added on line 139:

var url = typeof(entry.htmlLink) != 'undefined' ? entry.htmlLink : '';
@bensinclair
Copy link
Author

Just to expand on this, I beleive this is an issue with Google Apps calendars. I think Google must be tightening security. Under Calendar settings in Google Apps, it is set to show "Only free/busy information (hide event details)" which is what I think is causing this. I've switched to publicly show events (which can take 24 hours to update) so I'll let you know the results.

It might just be a privacy setting afterall.

@espen
Copy link
Contributor

espen commented Sep 8, 2015

Are you using the gcal as mentioned here? http://fullcalendar.io/docs/google_calendar/

The demo at http://fullcalendar.io/js/fullcalendar-2.4.0/demos/gcal.html seems to work.

@bensinclair
Copy link
Author

The demo isn't using a calendar attached to a Google Apps account (see my last comment). I'll let you know if me changing my security settings resolves the issue.

@bensinclair
Copy link
Author

Please see attached.

google apps calendar sharing

If you have not enabled sharing in Google Apps it doesn't provide things like the event name and the link. Obviously this is user error but maybe more graceful erroring would be useful?

@arshaw
Copy link
Member

arshaw commented Oct 11, 2015

i agree, a JS error should be avoided. there should be an existence check for htmlLink

@arshaw arshaw added this to the v2.7.1 milestone May 1, 2016
@arshaw
Copy link
Member

arshaw commented May 2, 2016

fixed with 7dc98d9. just released

@arshaw arshaw closed this as completed May 2, 2016
caseyjhol pushed a commit to caseyjhol/fullcalendar that referenced this issue May 10, 2016
caseyjhol pushed a commit to caseyjhol/fullcalendar that referenced this issue May 10, 2016
caseyjhol pushed a commit to caseyjhol/fullcalendar that referenced this issue May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants