Hey all,
I am getting a very annoing problem. On my site I installed CCK Signup, and enabled the CCK Signup Notifications module, that comes with this module. However, if I do so, and when I try to insert a new Signup Node... It falters with the following error:
Fatal error: Call to a member function set_subscription() on a non-object in /home/admin/domains/gburg.nl/public_html/zuidstudent/sites/all/modules/notifications/notifications.subscription.inc on line 1168
After some investigation the problem is found in here notifications_cck_signup.module:
function notifications_cck_signup_node_insert($node) {
$account = user_load($node->uid);
if (($signup_field = variable_get('cck_signup_signup_type_' . $node->type, 0))
&& notifications_user_setting('signup', $account, TRUE)
&& !empty($account->uid)) {
// Signup for initial notification.
$subscription = (object) array(
'uid' => $account->uid,
'type' => 'signup',
'event_type' => 'initial',
'fields' => array(
'nid' => $node->nid,
),
);
// PROBLEM IS HERE! AFTER THIS LINE THE CODE FALTERS lol, will never be seen... :(
notifications_save_subscription($subscription);
die("lol");
// Signup for reminder.
unset($subscription->sid);
$subscription->type = 'reminder';
$subscription->event_type = 'reminder';
$subscription->fields['nid'] = $node->{$signup_field}[0]['nid'];
notifications_save_subscription($subscription);
// Trigger initial signup.
$event = array(
'module' => 'cck_signup',
'oid' => $node->nid,
'uid' => $account->uid,
'type' => 'initial',
'action' => 'insert',
'node' => $node,
'params' => array('nid' => $node->nid),
);
notifications_event($event);
}
}
So it means that the subscription is built incorrectly... Could you please fix this soon, or make the dev version available :)