We've been working on standing up a new site using Drupal 7. Our current site is running D6 and Gcal Events with no problem.

We've installed GCal Events on the new site just as with the old one and everything is configured according to the documentation but I'm getting some error messages. I've turned on debugging.

All this shows up in green and shows good:
•GCal Events: PHP Memory Limit: 128M
•GCal Events: PHP Initial Memory Usage: 18.5MB
•GCal Events: PHP Initial Memory Usage (real): 18.8MB
•GCal Events: Timezone: America/New_York
•GCal Events: Simplepie version 1.2 <<<<<< NOTE - I get error messages even with 1.1.3. I can switch to 1.1.3 and report those as well if you'd like.
•GCal Events[Maintenance]: Num Events: 4
•GCal Events: Cache is set to sites/all/modules/gcal_events/cache
•GCal Events: Cache duration is 3600 seconds
•GCal Events[Maintenance]: FeedURL
•GCal Events[Maintenance]: Feed Init took 0 seconds
•GCal Events: PHP Memory Usage: 22.6MB
•GCal Events: PHP Memory Usage (real): 23MB
•GCal Events[Maintenance]: Feed processing took 0 seconds

This shows up in red:

•Deprecated function: Assigning the return value of new by reference is deprecated in gcal_events_get_events() (line 590 of /var/www/html/sites/all/modules/gcal_events/gcal_events.module).
... >>> Note the above message is repeated 114 times <<<
•Deprecated function: Function split() is deprecated in gcal_events_get_events() (line 609 of /var/www/html/sites/all/modules/gcal_events/gcal_events.module).
•Notice: Undefined variable: gcal_events in template_events() (line 859 of /var/www/html/sites/all/modules/gcal_events/gcal_events.module).

Sorry I can't be of more help on debugging this. I'm just not a programmer but will help in any way possible!

Thanks for any help you can provide.

Comments

endiku’s picture

Same exact error. Vanilla install of Drupal 7. No modules except gcal events. Tested a block according to the setup instructions using a the google holiday calendar.

cory_tobin’s picture

The deprecation warnings(s) on line 590 is actually an issue with SimplePie. See here http://drupal.org/node/1128418 Someone posted a patch but I couldn't get the patch to work. Once SimplePie 1.3 is released (and GCal is updated to use v1.3) this error should be fixed. In the mean time, I just turned off warnings in Drupal. FYI, one (undesirable) way to fix this problem right now is to go back to PHP4, which would also mean dropping Drupal 7.

As for the other errors, once you fix the "split() is deprecated" error, all the other errors go away. On line 609 replace split with preg_split. So the full line would read:
foreach (preg_split("[ \n]", $calendar_ids) as $calendar_id) {

This should solve all the other errors as well. If that doesn't let work, let me know. I don't actually know PHP but I might be able to help.

Metasequoia’s picture

subscribing

libweb01’s picture

I've had the exact same problem and preg_split() didn't fix it. Thanks.

mcmahos’s picture

Subscribing - same issue as everyone else. Is this module still being developed as it hasn't been updated for v7 for over a year now? Alternatively, is there another module that can be used to produce the same listing results?

libweb01’s picture

I think I've fixed it on my site. I went to sites/all/modules/gcal_events/simplepie.inc and replaced '=& new' with '= new'. I hope it helps you too.

libweb01’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.