Posted: June 20, 2014 at 3:44 pm
|
On our template that we’re using we have it set to display a dropdown list of dates for recurring events with multiple dates. I can provide a link if necessary. Here’s a screenshot to show what I mean: The event on top is also part of the recurring series of events, but it is not being grouped with the multiple dates for the other two dates (see expanded screenshot) Please let me know what additional information you think would be required here. I have put the associated template into a pastebin |
|
Hi Dustin, Could you post the image again please as it didn’t come through (using a thirdparty image hosting site might be better). Was this recurring event modified after creation to add in more dates? |
|
Yes it was modified after creation to add more dates, ideally this would just add a date to our listing, see screenshots below. I’ll just link to screenshots instead of embedding: Thanks, |
Hi Dustin, The code that’s handling the query that’s likely affecting this is most likely in event-list.php. You could look for an GROUP BY clause and make sure it’s grouping by the recurring event ID and also the ORDER BY clause and make sure it’s ordering by the recurrence ID first, then the date. You might also find the example reference templates included inside the REM plugin helpful if you compare their code to what you have. |
|
|
After a lot of testing I’m still getting issues after following your instructions I’ve changed the sql to the following, but it still is splitting off the 4th date for one reason or another. <code>$sql .= $show_recurrence == 'false' ? " AND e.recurrence_id = '0' " : ''; $sql .= " GROUP BY e.id "; //this bit broke up the recurring events ticket #539 $sql .= $order_by != 'NULL' ? " ORDER BY " . $order_by . " ASC " : " ORDER BY recurrence_id,date(start_date) ASC "; $sql .= $limit > 0 ? ' LIMIT 0, '.$limit : ''; </code> I also tried fully overwriting the template with this: also with no luck, it just moves the event in question to the bottom list but one of the dates still gets split off |
|
The code tag didn’t seem to work very well so here’s a pastebin instead |
Hi Dustin, Can you look in the database (using something like PHPmyadmin) at the _events_detail table for the event that’s getting split off and make sure that it has the same recurrence ID as the others? |
|
|
Yes, all 4 events have the same recurrence_id. |
Hi Dustin, Within the last pastebin you posted is this line: $sql .= ' GROUP BY e.id '; change that to $sql .= ' GROUP BY e.recurrence_id, e.id '; That should group the events by the recurrence_id and then the id. |
|
|
I tried your change with no luck, the last event in the series is still splitting off |
|
Any other updates on this, or any further information you need from me to help solve this problem? Seems to be an issue somewhere in the database but it doesn’t make any sense to me since everything looks correct. |
Hi Dustin, I think this is an issue with your custom code. Can you try using the recurring event templates that are included with the REM plugin instead to see what they do. Also, can you check the shortcode on the page? Is it [EVENT_LIST] or something else? |
|
|
Using the event_list template that is included by default didn’t help. I managed to stop it from happening for now by doing some debugging and deleting past events that were sneaking their way into the query results (the query results from the template were not following the order by clause properly, but in the database the same query that was executed was behaving properly. Makes no sense to me…). I’ll mark this as closed for now, its frustrating but at least we have a solution. Thank you all for your help. |
The support post ‘Recurring Events with multiple dates are splitting off into seperate listings’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.