Posted: May 16, 2013 at 9:38 am
|
We recently upgraded EE Calendar from 2.0.3 to 2.0.5.1. We have numerous events with multiple categories; with the old calendar, a class was added for each category (i.e. if we had an event assigned to categories of “Adults” and “Kids”, a class would be added for each.) Has this functionality been dropped with the new version? We only see 1 category class instead of multiple category classes. I output the JSON string passed by the
Thanks! |
Hi Danielle, They made some changes to the way the category class names are queried because it was causing some serious performance issues (the calendar would stop loading if you hit a threshold of open events). There is an open ticket to work in a solution that uses fewer queries and outputs all the class names instead of just one. In the meantime you could revert back to the previous version of the calendar. |
|
|
Cool Josh – thanks for the reply; will keep an eye out for the update. I was able to modify the query and the way that the class names are stored in the |
Hi Danielle, Which query did you modify and how? This information may be helpful to the developers who are working on this (it might be helpful to compare notes). |
|
|
Hey Josh, Ideally I think I would have done a UNION so we could have a poor man’s OUTER JOIN, (since MySQL doesn’t support it). Basically I edited the query starting around line 217 in espresso-calendar.php and removed the GROUP BY e.id statement. This returns several rows for each event but each one has the different category. So that only one of each event appears on the calendar, when looping through the events, I put each event into the
Finally, because a JSON string with numeric keys broke the calendar, I stripped the numeric keys from the finalized array:
As I said, it’s probably not the most elegant solution, but it seems to work fairly well without having to query each event individually as was the case in the old version. Hope this helps — let me know if you have any questions. |
The support post ‘Multiple Category Classes on Calendar’ 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.