Hi,
I have three Google iCal feeds syncing with EO (we’ll call them A, B, and C). The calendars are set to sync hourly, and Feeds A and B auto-sync fine. However, Feed C doesn’t sync unless I manually do it. And when I do, it spins for a while and then tells me:
“An unknown error has occurred”
When I refresh the iCal Feeds page, Feed C reports that it successfully synced.
What can I do to make Feed C auto-sync correctly?
Possibly related, when I delete events from Feed C’s Google calendar, the events do not get deleted from the website. However, when I imported Feed C on a local install of WP, deleted Google cal events get deleted from my local WP install.
-
This topic was modified 5 years, 7 months ago by Eric Corpus.
Eric Corpus
Hi Eric,
Do you mind sharing the feed URLs? (If so, feel free to use the contact form to send them.
Based on what you’re seeing, my initial thought is that its timing out. But this may require more investigation.
It sounds like its working on your local test install. Is that right?
Stephen Harris
Hi Stephen,
I sent the three feed URLs through the contact form.
I haven’t tested the auto-sync on my local install. However, when I do sync it, it doesn’t give me the “unknown error” message, and it deletes events that I delete on Google calendar.
Eric Corpus
The scheduled auto-sync appears to be working on my local install. No reported errors.
Eric Corpus
Hi Stephen – is there an update on this?
Eric Corpus
Hi Eric,
I ran these in my test environment, and I believe the feed in question is so large that its either timing out, or out of memory.
The feed is large (about 5 times as large in size, and 4 times as large in lines as one of the other two). I found importing that feed took about 14 minutes, when using a standard http request the PHP server is usually limited in memory and time which makes it likely that it’ll run out of one or the other, or both.
However, if you use WP Cli you can run the command:
wp eo ical-feed fetch {feed id}
To get the feed ID you can run
wp eo ical-feed list
Typically PHP Cli has larger memory / time limits. You also set up a cron job on the server to run that command routinely.
Stephen Harris
Thanks, Stephen. I will look into this and let you know.
Eric Corpus
Hi Stephen,
I have a cron plugin that manages events. Could I run the command through the following? I’m new to CLI. Thanks!
Eric Corpus
Hi Stephen – just checking on my question on whether I could put some PHP in the Cron plugin I screenshotted there. If so, can you guide as to what that code would be?
Thanks!
Eric Corpus
Hi Eric, you could try
eo_fetch_feed( $feed_id );
where $feed_id
is the ID of the feed. Unfortunately you won’t be able to determine that ID from the iCal feed screen; it’s only exposed in the Cli – however, if you look at the HTML of the ical feed table, you’ll notice that echo ‘row’ is in fact <tbody>
and has any ID of the form eo-feed-XXX
– the XXX
is the ID of the feed.
Stephen Harris
Thanks, Stephen. I’ll try this and let you know.
Eric Corpus
I added the code to the cron plugin, and the feed imports on schedule now. I also deleted a lot of old events from that Google calendar to keep it from getting too bloated.
Thanks for your help!
Eric Corpus