First of all, thanks to crew who worked to get the module up to date for the Google Calendar API v3! Well done, greatly appreciated.
We were able to get the module updated and pushed out and our calendars are working again. Since pushing out the latest DEV version we have noticed our watchdog logs have filled up with the following error:
Notice: Undefined property: stdClass::$hangoutlinktext in _agenda_parse_event() (line 361 of /srv/bindings/xxxxxxxxxxxxxxx/code/sites/all/modules/agenda/agenda.module).
Wasn't sure if we should have stuck this on the bottom of the other Issue (https://www.drupal.org/node/2376795) so we just created a new one.
Comments
Comment #1
StuddMan commentedComment #2
gooddesignusa commentedtry going to the agenda block settings and save the block again.
Comment #3
nerian79 commentedAfter saving the block the error goes away. But then comes back the next time the cache is clear and the data is retrieved again.
Comment #4
gooddesignusa commentedI can't seem to reproduce the error. Before I started I made sure my error_reporting in PHP was set to E_All.
I tried clearing out the hangout link text & changing cache time to 10 seconds. Saved, ran cron, flushed cached. I also tried the same test with the default text. Not sure why it would throw a notice with this field. It's the same as the normal event link. We can wrap it in an isset() but I would like to know why it keeps getting cleared out.
Does this happen with other calendar feeds? If you make a new agenda block and set it up with the same settings does it still happen?
Comment #5
guschilds commentedThere are two ways to reproduce this issue:
First scenario
Second scenario
In both cases, the error won't appear after the first page load until cache is cleared.
The first scenario occurs because
hangoutlinktextwas not added toagenda_install_fixtures()within agenda.install. Doing so will solve that problem. It will not solve the second case, however, asagenda_install_fixtures()will/should not be run again when the module is upgraded. A proper update hook to solve this problem is pretty ugly. Instead, ensuring$block->hangoutlinktextexists before using it may be the safest route to take.I've attached a patch that solves both problems. Please test against them and feel free to suggest/implement improvements.
Thanks!
Comment #9
guschilds commentedI have committed this fix to the 7.x-2.x branch. It will be available in the next development release and any releases after 7.x-2.0-beta1.