Import from Google Calendar URL failing

Home Forums Calendar Products Event Aggregator Import from Google Calendar URL failing

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1106773
    tenadams
    Participant

    Hey all,

    We’re having an issue importing the following Google Calendar URL into The Events Calendar (PRO):

    https://calendar.google.com/calendar/ical/pp9okp1tcc59e3hh7526qgr0go%40group.calendar.google.com/private-526498aa43b44c9adc32ceeb9eb2c7f8/basic.ics

    It contains several recurring events. We were previously successful importing a different Google Calendar (with less events, but still recurring) into the same website.

    When we try to import it fails, getting this error:

    The server responded with a malformed response. Please see the JS console for more information.

    I suspect that because of the recurring events that the import is basically timing out. With this in mind I set the global Events > Settings > General > ‘Create recurring events in advance for’ option to 3 months (and then 1 month) because we have no need to import weeks and weeks in advance (and the import is set to reoccur anyway).

    However even when the import did partially succeed before timing out it still imported events up to 2017 I noticed so the iCal import seems to be ignoring this global setting (I don’t know if this is intentional or not).

    I should add that also after the initial import we set it to auto import at an interval and this fails too (getting the ‘1 saved import did not complete’ message).

    My questions then are:

    1) Is there a way to get around this ‘timeout’ (assuming that’s what it is) or failure in general?
    2) Is there a way we can either get the import to respect the global ‘Create recurring events in advance for’ option (to try to reduce the overhead) or, if not, is there a filter or something we can apply in functions.php or similar that will manually set a limit on the iCal import?
    3) I noticed this thread – https://theeventscalendar.com/support/forums/topic/ics-file-does-not-work-from-google-ics-url-or-local-ics-file-upload/#dl_post-1102476 – where another customer seemed to have a similar issue and Brook mentioned there was a bug that had been introduced and that a fix would be released soon. If indeed we do have the same issue, will the fix be released soon or can we rollback to a previous version like Brook mentioned in the meantime to allow us to complete the import?

    Thanks,

    Nick

    #1107627
    Nico
    Member

    Hi there Nick,

    Thanks for getting in touch, and for the detailed report about the issue! I’ll help you here…

    1) Is there a way to get around this ‘timeout’ (assuming that’s what it is) or failure in general?

    I just gave the import a try and could successfully import 103 in my local install without any troubles.

    2) Is there a way we can either get the import to respect the global ‘Create recurring events in advance for’ option (to try to reduce the overhead) or, if not, is there a filter or something we can apply in functions.php or similar that will manually set a limit on the iCal import?

    Recurring events from ics files are imported as single events, so this option won’t work for this. You can limit the import by selecting to import less events from the list of by limiting by keyword. Those this make sense?

    3) I noticed this thread – https://theeventscalendar.com/support/forums/topic/ics-file-does-not-work-from-google-ics-url-or-local-ics-file-upload/#dl_post-1102476 – where another customer seemed to have a similar issue and Brook mentioned there was a bug that had been introduced and that a fix would be released soon.

    The bug discussed in this thread seems to be different (iCal Importer only imports the first instance of a recurring event), anyway the release he is referring to is about to be out really soon. Probably today or tomorrow, so please update and let me know if you see any changes in this.

    I suspect this might be related to the server environment you are hosting your site in. Do you have a local staging site or a WordPress site in other server to run a new test on this?

    Please let me know about it,
    Best,
    Nico

    #1107683
    tenadams
    Participant

    Hi Nico,

    Thanks for the reply.

    We now seem to be having a separate issue which is stopping us even reaching the Save Recurring Imports issues I described above. Essentially, when I attempt to do a fresh import of the iCal URL from scratch I now get the following error:

    “Your search returned no results. Please adjust your search.”

    Here’s a screengrab:
    https://dl.dropboxusercontent.com/s/unjcns05nf7qgfj/2016-04-27%20at%2017.00.png

    Here’s the (updated) Google Calendar URL (which has plenty of events on it):

    https://calendar.google.com/calendar/ical/pp9okp1tcc59e3hh7526qgr0go%40group.calendar.google.com/private-bb581f6a83c293830c6ab54d9f841c5a/basic.ics

    There are no Events in WordPress currently (including the Trash), I emptied everything out before trying again and there are no other imports set to run.

    Any idea what we can do to resolve this?

    Thanks,

    Nick

    #1107691
    tenadams
    Participant

    I should add the reason for trying again (when we’ve yet to resolve the other issues) is I’ve changed all the recurring events in Google Calendar to only repeat for the next few weeks now, instead of ‘Never expire’ (which is what is what it was set to at first).

    Hopefully by making this switch it will get around the timeout that is happening from the WP Engine side because it’s only trying to import a fraction of the events now.

    (I’ve asked WP Engine if they can disable or increase the timeout on a permanent basis and they’re not able to).

    However I’m not able to test it because I’m now getting this “Your search returned no results” error we haven’t experienced previously.

    #1108175
    Nico
    Member

    Hey Kris,

    Thanks for following up!

    You are not seeing any events available because we store ‘flag’ for imported then deleted events. This helps to prevent deleted events re-import in scheduled imports. Please take a look at this answer to see how to get around this: https://theeventscalendar.com/support/forums/topic/ical-import-worked-once-now-your-search-returned-no-results-every-time/#dl_post-1029844

    Regarding the Google Calendar change you made, that was an smart call 🙂

    Please let me know if you can re-import now,
    Best,
    Nico

    #1108371
    tenadams
    Participant

    Hi Nico,

    Yes, I found out and cleared the ‘flag’ through some trial and error and searching through the forums.

    Even though the flag is cleared and we’ve restricted the import to just a few weeks ahead though we’re still hitting the same import error and we can’t import everything.

    The timeout itself is happening from the WP Engine side but I’ve spoke to them and they won’t lift it, which brings me back to the plugin itself.

    Is there no way (and I’m fine doing it via code, I don’t need an admin option) to restrict the number of recurring events created by the auto import? That way I could pick a number – say 1 months or 2 months – that allows the auto import to stay in place – with each recurring event theoretically set to forever on the Google Calendar side – but only two months’ worth created in WordPress?

    Otherwise – even if we manage to get the import into WordPress by severely restricting the number of weeks ahead each event reoccurs within Google Calendar – we’ve just created a lot of work for ourselves having to go back in to Google Calendar every few weeks and extend the repeat field for each event again manually.

    Appreciate your help with this.

    Thanks,

    Nick

    #1108950
    Nico
    Member

    Hey Nick,

    Thanks for clarifying! I can totally get the issue with the recurring events in Google Calendar. Unfortunately we don’t have a way to filter / modify the end date value. This is something that has been logged as new a feature a short time ago, I went an added your case and bumped the ticket priority.

    For now the only solution is to patch a plugin file, we don’t recommend doing this as the edits will be lost in every plugin update and because it’s not a good practice in general. The file you could modify is the following: wp-content/plugins/the-events-calendar-ical-importer/src/Tribe/Main.php, specifically line 656.


    // change this line
    $args['end'] = date( 'Y-m-d', strtotime( '+2 year' ) );
    // for something like
    $args['end'] = date( 'Y-m-d', strtotime( '+1 month' ) );

    Check strtotime documentation to see how you can input the date there.

    Please let me know if this workaround might work for you,
    Have a great weekend,
    Nico

    #1114592
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Import from Google Calendar URL failing’ is closed to new replies.