The module show old events from the Google calender.
Some of these events are from the past. Other old ones are not displayed.
How can I this be fixed?
Calender in question: http://www.google.com/calendar/embed?src=dpven58k1oekn0naovb9krrnig%40gr...
Drupal site with GCal_events: http://ematch.eu

Comments

anyr’s picture

Same, I have three blocks, and they are showing last March, October and November respectively. All have events for this month + the future, none of which are private.

anyr’s picture

(This is true even with the cache disabled)

The script I wrote for the php site I'm transferring content from (to drupal) works ok on the same calendars

Se7enLC’s picture

Try the dev version

anyr’s picture

Thanks but I just tried it and now it displays no events at all :/

bethallen’s picture

I am having the same issue. I've tried several different calendar feeds. They are all behaving differently. On one, that is an older calendar that's been around for a while, it is showing events from last august. On newer calendar, I am only getting events from next week and later, but nothing from this current week.

Is there something that has to be done on Google's end to configure the event feed?

perhenrik’s picture

I've upgraded to the dev-version and it still show old events.

mr_Zombie’s picture

I have this same problem. GCal shows nothing but old events and that makes this module pretty much useless.

Neues Atelier’s picture

Has anybody found a solution for that?

gmleonm’s picture

I had the same issue. Using an older version of simplepie.inc fixed it. Hope this helps others too.

cbutera’s picture

This happened to me when using SimplePie 1.2. When I downgraded to 1.13 it worked. Hopefully a future release of SimplePie will fix this.

alexkb’s picture

I've downgraded to SimplePie 1.1.3, which has partially fixed the problem - I can see future events now, but the first two events are both "Christmas Day 1 January, 1970all day".

Any one have any suggestions for fixing this?

jimmynash’s picture

I ran into this issue with the 6.x-1.4 version but also needed the multiple calendar functionality that the dev version has in the block settings.
I upgraded to 6.x-1.x-dev to get that first and then moved on to addressing old events.

My SimplePie version on the simplepie.inc file is 1.2.1-dev. Drupal core version 6.19.

I added this to the gcal_events.module file on line 764 and it seems to have fixed the issue for me at this point.

      if($unixdate < time()) {
        continue;
      }

I would think that there might be a case to show old events. If so, I think it would probably need to be a per block setting similar to the "Show events from today only" setting. Like a "Show Only Future Events" setting which could trigger something like I have above.

That way you could have a block on say an archives page that shows old events and then have another that only shows future events.

Please correct me if what I have done is not the right way or suggest a better way to handle this.

hondaman900’s picture

I have the same issue where events on the online calendar are deleted but persist on the website GCal module display block. I made the above suggested change and it torpedoed the site with the following error message:

Fatal error: Cannot break/continue 1 level in /home/mediaq/lgsgsa.dreamhosters.com/modules/gcal_events/gcal_events.module on line 765

Thoughts/suggestions?

minicraig’s picture

Thanks jimmynash, Have been using your addition with 6.x-1.x-dev for a while now but have since changed to 6.x-1.4.

I have found that a similar thing can be done in this case:

For Gcal events 6.x-1.4:

in file gcal_events.module (/sites/all/modules/gcal_events/gcal_events.module)

Find:
foreach ($temp as $item) {

Add after:

// Failsafe to remove previous events
if($item['date'] < time()) {
	continue;
}

hondaman900 just check your version no as to which of these two corresponds.
Implementing jimmynash's code on a new line just below $gcal_date = date($dateformat, $unixdate); for 6.x-1.x-dev should work. This corresponds to line 764 if your version is correct and code hasn't been touched.

I had a very long look through the code and from what I can see the arguments which define the dates are dropped at $feed->set_feed_url($calendar_xml_address); on line 603.

rlca’s picture

Title: Shows old events » Does not show some events
Priority: Normal » Major
Issue tags: +calendar events

I have a calendar with events throughout 2011 and 2012, yet GCal v 6.1.4 only shows the dates occurring after January 20, 2012. Any thoughts on why this happens?

jdwfly’s picture

Issue tags: -calendar events

@rlca - which simplepie version are you using? Downgrade to 1.1.3 to see if that solves your problem. Make sure to clear the cache.

rlca’s picture

@ jdwfly - that seems to work. Thanks!

grguth’s picture

Priority: Major » Normal

Where can I find version 1.1.3? The only download available at their site is 1.2.

jdwfly’s picture

denisgre’s picture

Downgrading to 1.13 did not work for me but Minicraig's hack did. Perhaps this can be added to the next release.

Thanks Minicraig!

jdwfly’s picture

Status: Active » Closed (fixed)

6.x requires the older Simplepie.