I have utilized the CCK Signup Basic feature and setup the Event/Signup content types manually and for both I receive the following warning:

[code]Warning: Missing argument 2 for notifications_cck_signup_notifications() in notifications_cck_signup_notifications() (line 85 of C:\wamp\www\CSDev\sites\all\modules\cck_signup\notifications_cck_signup\notifications_cck_signup.module).[/code]

Would anyone happen to know why I am receiving this error when using CCK Signup notifications?

Comments

CrashNet’s picture

Title: Warning: Missing argument 2 for notifications_cck_signup_notifications() in notifications_cck_signup_notifications() » Warning: Missing argument 2 for notifications_cck_signup_notifications() in...
Frickelpiet’s picture

Same error here: "Warning: Missing argument 2 for notifications_cck_signup_notifications() in notifications_cck_signup_notifications() (Zeile 85 von /var/www/vhosts/domain.de/subdomains/test/httpdocs/sites/all/modules/cck_signup/notifications_cck_signup/notifications_cck_signup.module)."

robbiew’s picture

Same errors for me.

jhedstrom’s picture

Status: Active » Closed (duplicate)

Marking as a duplicate of #1044968: Undefined function Notifications_Subscription::set_account(), as no work has been done on the upgrade of the notification component (the notification module for 7.x is stalled, and this functionality may eventually be ported to use Rules).

toniodrupal’s picture

Can anyone help?

I am using drupal 7.8 on an local xampp server (E:\xampp\htdocs\). I tested notifications-7.x-.1.0-alpha1 and notifications-7.x-1.x.dev with cck_signup-7.x-1.0-alpha4. In both situations when enabling the CCK Sign-up notifications module, I received two times the identical warning lines.

*Warning: Missing argument 2 for cck_signup_group_confirmation_notifications() in cck_signup_group_confirmation_notifications() (line 149 of E:\xampp\htdocs\drupal78\sites\all\modules\cck_signup\cck_signup_group_confirmation\cck_signup_group_confirmation.module).

I am certainly not qualified in writing php code, but I know that a missing ; or wrong placed } or ) does lead to error messages. So I looked into the module file. I checked it against the same file from cck_signup-6.x-1.0-beta2. I found no differences in the code.

Part of the code dealing with the function call in line 149 reads:

147 * Implements hook_notifications().
148 */
149 function cck_signup_group_confirmation_notifications($op, &$arg0, $arg1 = NULL, $arg2 = NULL) {
150  switch ($op) {
151   case 'subscription types':
152      $types['group_confirmation'] = array(
153        'title' => t('Initial sign-up notice'),
154        'access' => 'subscribe to group confirmations',
155        'fields' => array('nid'),
156        'event_type' => 'group_confirmation',
157        'description' => t('Receive notifications when an individual confirm attendance of a group sign-up'),
158      );
159      return $types;
160
161    case 'event types':
162      $types[] = array(
163        'type' => 'group_confirmation',
164        'action' => 'insert',
165        'name' => t('Individual attendance of a group sign-up'),
166        'line' => '',
167        'digest' => array('node', 'type'),
168        'description' => t('An individual has confirmed attendance of a group sign-up'),
169      );
170      return $types;
171
172   case 'query':
173      // $arg2 is $event array.
174      if ($arg0 == 'event' && in_array($arg1, array('group_confirmation')) && ($nid = $arg2->oid)) {
175        $query[]['fields'] = array(
176          'nid' => $nid,
177        );
178
179        return $query;
180      }
181      break;
182
183    case 'access':
184      // @TODO
185      return array(TRUE);
186  }
187}
189
190/**

I cannot interpret this code, but I do guess that the three arguments or variables ($arg0, $arg1, $arg2) called in line 149 should be defined somewhere.

Ignoring these warnings and creating new content via ‘content>signup’ I get a blank page with the following message:

Fatal error: Call to undefined function xdebug_break() in E:\xampp\htdocs\drupal78\sites\all\modules\cck_signup\notifications_cck_signup\notifications_cck_signup.module on line 202

Part of the code around/dealing with the function call in line 202 in this module file reads:

199 * Detects upcoming events and fires notification events.
200 */
201 function notifications_cck_signup_cron() {
202  xdebug_break();
203  foreach (node_type_get_types() as $type) {

When disabling the module CCK Sign-up notifications (located in the block with the notifications modules) I can use the signup content type. Both warnings do not appear.

Nevertheless the notification possibility is one of the attractive features of the cck_signup module.

EthanT’s picture

I was able to resolve this issue by changing line 85 of notifications_cck_signup.module
from:
function notifications_cck_signup_notifications($op, &$arg0, $arg1 = NULL, $arg2 = NULL)
to:
function notifications_cck_signup_notifications($op, $arg1 = NULL, $arg2 = NULL)

and line 149 of cck_signup_group_confirmation.module from:
function cck_signup_group_confirmation_notifications($op, &$arg0, $arg1 = NULL, $arg2 = NULL)
to:
function cck_signup_group_confirmation_notifications($op, $arg1 = NULL, $arg2 = NULL)

Another issue to bear in mind: the current version of notifications requires php 5.3 to run, but there is a patch to backport it to run with 5.2. Make sure you apply the patch found here: http://drupal.org/node/1209932#comment-4755372 to said module.

toniodrupal’s picture

Priority: Normal » Critical
Status: Closed (duplicate) » Fixed

From what I gathered from the drupal Site Building Guide, the hook implementation beginning at line 147 and reported in #5 has an error. http://drupal.org/node/407338 shows that &$arg0 should have the argument NULL: &$arg0 = NULL.

Via Google I found the same line on the website of the Aten Design Group http://atendesigngroup.com/blog/extending-subscriptions-module-node-refe... where the subscription module was discussed. I also got a file used on the website of the swim team of chapel hill with the author name Jonathan Hedstrom http://townofchapelhill.us/sites/all/modules/cck_signup/notifications_cc.... Jonathan Hedstrom is a contributor to Drupal which gives him some authority

Correcting line 149 of the file cck_signup_group_confirmation.module and line 85 of the file notifications_cck_singup_notifications.module gave no warning when enabling both modules.

My suggestion would be to update the above mentioned files in the notifications package, so the missing argument issue discussed here, has been resolved.
Since I am new to the drupal community, I don’t know how this works. Nevertheless I took the liberty to choose assign “critical” to the priority and “fixed” to status. The mentioned cck_signup-7.x-1.0-alpha4 is the most recent.

As Yet I have not tested the changed modules in a signup model as described in "signing up for events" in http://drupal.org/node/998334 mostly because of lack of time. Getting to understand the "event calendar" and actually get it working was a pain in the ... head.

toniodrupal’s picture

As for the "missing argument" see #7.

The fatal error: Call to undefined function xdebug_break(), was resolved via the fix reported in http://drupal.org/node/1077442

taecelle’s picture

Get the message
Fatal error: Call to undefined method Notifications_Subscription::set_account() in /var/www/u2075053/public_html/sochinitell.pp.ua/sites/all/modules/notifications/notifications.subscription.inc on line 1061

How can it be fixed?

I've already applied patch #6

jhedstrom’s picture

Status: Fixed » Closed (duplicate)
taecelle’s picture

I've seen this issue, thanks. And apply what is said there.
But it doesn't work((