Hi!

Fresh install of COD trying to create a new session at /node/add/session I get the following error messages.

  • Notice: Trying to get property of non-object in _cod_schedule_timeslot_view_widget() (line 814 of /var/www/profiles/cod/modules/contrib/cod_support/cod_schedule/cod_schedule.module).
  • Notice: Trying to get property of non-object in cod_schedule_form_node_form_alter() (line 245 of /var/www/profiles/cod/modules/contrib/cod_support/cod_schedule/cod_schedule.module).
  • Notice: Trying to get property of non-object in cod_schedule_form_node_form_alter() (line 251 of /var/www/profiles/cod/modules/contrib/cod_support/cod_schedule/cod_schedule.module).

Regards,

Frederick

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frederickjh created an issue. See original summary.

limako’s picture

I'm getting the same errors with alpha5, although I only get two errors if I use a different (non uid=1) account:

Notice: Trying to get property of non-object in _cod_schedule_timeslot_view_widget() (line 775 of /home/limako/are-esperanto.org/profiles/cod/modules/contrib/cod_support/cod_schedule/cod_schedule.module).
Notice: Trying to get property of non-object in cod_schedule_form_node_form_alter() (line 225 of /home/limako/are-esperanto.org/profiles/cod/modules/contrib/cod_support/cod_schedule/cod_schedule.module).

limako’s picture

OK. It's $event->nid that's causing the problem. $event appears to be an array, not an object, and replacing $event->nid with $event['gid'] makes the errors stop.

Note: I don't pretend to understand what this code is actually doing.

ckng’s picture

See attached patch.
Fix for this issue is above of the patch, bottom of the patch are code indentation issue.

ckng’s picture

Version: 7.x-2.0-alpha6 » 7.x-2.x-dev
Status: Active » Needs review