Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#4 | cod_support-session_add_edit_error-2762891-4.patch | 3.63 KB | ckng |
Comments
Comment #2
limako CreditAttribution: limako commentedI'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).
Comment #3
limako CreditAttribution: limako commentedOK. 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.
Comment #4
ckngSee attached patch.
Fix for this issue is above of the patch, bottom of the patch are code indentation issue.
Comment #5
ckng