Forum Replies Created
-
AuthorPosts
-
June 13, 2016 at 6:37 pm in reply to: Recurring event iCal export link doesn't generate recurring calendar event #1126475
joshuacboorman
ParticipantHi Nico,
Aha! Brilliant, having that setting unchecked fixed the issue, all looks good now. Thanks very much for your help.
June 1, 2016 at 1:27 am in reply to: Recurring event iCal export link doesn't generate recurring calendar event #1121061joshuacboorman
ParticipantI don’t think so – both events were set to occur in the future.
No change in behaviour when the parent ID was present. Still exported a single event and ignored the rest of the series.
I’ve exclusively been testing this in single event pages – that comment is in reference to me tinkering with the tribe_get_events() function your snippet calls to see where things were going wrong.
May 19, 2016 at 10:48 pm in reply to: Recurring event iCal export link doesn't generate recurring calendar event #1116858joshuacboorman
ParticipantThanks Nico,
I’ve been testing this in the single events page, yes. I added that snippet and, oddly, initially it was showing a parent ID of 0 on all recurring events as before, but to double-check I created a new test recurring event and that one had its post_parent IDs set correctly. My only guess is the old event was around prior to updating WordPress and the plugin, so maybe the data for the old events got mangled in some way.
No change in the issue with retrieving the event series via tribe_get_events(), either way – it’s like that function (and get_posts() for that matter, which I also tried) simply can’t see the child events.
May 18, 2016 at 7:12 pm in reply to: Recurring event iCal export link doesn't generate recurring calendar event #1116194joshuacboorman
ParticipantI’ve followed your guide for testing for conflicts with no change in behaviour. I’m using the latest version of the plugins. Unfortunately I can’t give you a link as it’s a client website on our staging server.
As far as I can tell, the problem is occurring in this part of the tribe_get_recurrence_ical_link() function:
$child_events_ids = tribe_get_events( array( 'fields' => 'ids', 'post_parent' => $parent_id ) );In my case $parent_id is always the $event_id at this point, as none of the events have $post->parent set. I’ve dumped all the events via tribe_get_events() and $post->parent is 0 on each of them. $child_events_ids is just an empty array after the above assignment – what’s more, the below also returns an empty array, even though it should at least return an array of existing event IDs:
tribe_get_events( array( 'fields' => 'ids' ) );As a result the link generated for the iCal export is: http://[link to event]?ical=1&event_ids=5968
If I add other event ids to that URL by hand it works perfectly, so it’s just that it isn’t finding the recurring event children when it looks for them.
Any idea why this would be happening?
May 10, 2016 at 7:46 pm in reply to: Recurring event iCal export link doesn't generate recurring calendar event #1113018joshuacboorman
ParticipantThanks for the response Nico,
I actually already found that snippet when I was hunting for a solution earlier – like I mentioned in my initial post, the tribe_get_recurrence_ical_link() function you’re using in that snippet doesn’t seem to work as intended. I’m using that snippet currently, but it only outputs an ics file of the first event.
It looks like the tribe_get_recurrence_ical_link() function tries to compile an event series by assembling a list of event post IDs, but since events in a recurring series all share the same ID you only get the first event anyway.
Much appreciated anyway – any other ideas?
-
AuthorPosts
