CGCalendar, upcominglist, and unique_only

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
jonnypage
New Member
New Member
Posts: 5
Joined: Thu Jan 11, 2007 10:54 pm

CGCalendar, upcominglist, and unique_only

Post by jonnypage »

CGCalendar 1.2.5
CGExtensions 1.17.6
CMS Made Simple 1.6.6 "Bonde"

Hey, I've been searching for this all day, and only find things that are close.. so here we go.

I'm making a calendar with upcominglist, and I have a few items that repeat every week, so have generated child events for them.  When I use my template normally, they all show up, from most recent to furthest away.  When I add unique_only - only the last date item (sometime in 2015) is shown, not the most current one.

Is there a way to make it show the most recent event in a series, and not the last one, while still using unique_only?
Last edited by jonnypage on Tue Feb 23, 2010 10:38 pm, edited 1 time in total.
jonnypage
New Member
New Member
Posts: 5
Joined: Thu Jan 11, 2007 10:54 pm

Re: CGCalendar, upcominglist, and unique_only

Post by jonnypage »

I found that if I removed all the child events manually (checking the boxes to delete) then add them again in the parent, that it works like it should. Anyone have any idea why I have to delete the first set of child events?
jonnypage
New Member
New Member
Posts: 5
Joined: Thu Jan 11, 2007 10:54 pm

Re: CGCalendar, upcominglist, and unique_only

Post by jonnypage »

anyone? I am still having this problem in 1.5.2. The last child event date shows, and not the next one.

ie: date shows dec 30, 2010, when the calendar is set to repeat every thursday from jan 7, 2010 to dec 30, 2010. It will not show the next thursday in the cycle.

Sometimes when I delete and remake the child events it will show a random date, like may or september. Weird.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CGCalendar, upcominglist, and unique_only

Post by Dr.CSS »

You have all the latest versions of these modules?...

If so you may want to file a Bug Report in the modules forge page...
SESTH
New Member
New Member
Posts: 4
Joined: Tue Aug 03, 2010 8:11 pm

Re: CGCalendar, upcominglist, and unique_only

Post by SESTH »

Hi,

I have a similar problem with CMS-Version 1.9.2, CGExtensions 1.24.2 and CGCalendar 1.5.7. When I try to show upcoming events I would expect to get the next event for each title. But the result seems to depend on the order of events in the database. With unique only settings the following sample query is generated:

Code: Select all

SELECT cms_module_cgcalendar_events.* FROM cms_module_cgcalendar_events WHERE (cms_module_cgcalendar_events.event_date_start >= '2011-04-12 18:06:07' OR (cms_module_cgcalendar_events.event_date_end >= '2011-04-12 18:06:07' AND COALESCE(cms_module_cgcalendar_events.event_date_end,'0000-00-00 00:00:00') != '0000-00-00 00:00:00')) GROUP BY cms_module_cgcalendar_events.event_title ORDER BY cms_module_cgcalendar_events.event_date_start ASC
GROUP BY first operates on unsorted data and returns the first found record for each title and then the remaining records are sorted. There is no guarantee to get the first upcoming event for each title.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm
Location: the Netherlands

Re: CGCalendar, upcominglist, and unique_only

Post by M@rtijn »

And?
Is there a question to this post?

Have you tried unique_only='0' to get all the events?
Make your community a better place!
SESTH
New Member
New Member
Posts: 4
Joined: Tue Aug 03, 2010 8:11 pm

Re: CGCalendar, upcominglist, and unique_only

Post by SESTH »

Not a question but a possible explanation for the behavior.

With unique_only='0' you won't run into this problem ;) because the above GROUP BY clause is omitted then.

It might be a bug - but I haven't found a description that unique_only should return the most nearest event from now.
User avatar
M@rtijn
Power Poster
Power Poster
Posts: 706
Joined: Sat Nov 14, 2009 4:54 pm
Location: the Netherlands

Re: CGCalendar, upcominglist, and unique_only

Post by M@rtijn »

Yes, the behaviour is known.

Bugs shouldn't be reported through the forum, we have the Forge for that.
Make your community a better place!
Post Reply

Return to “Modules/Add-Ons”