I'm currently using this module for a website I'm building, so far it works great. There is however one error that keeps coming back:

Notice: Undefined index: nl in _cck_signup_validate_signup_node() (line 104 in /opt/vvh/public_html/sites/all/modules/cck_signup/cck_signup.module).

This notice is displayed when someone signs up for an event. it is purely an notice, the module itself does work as expected. I did a quick investigation and couldn't find a solution, maybe I will investigate this later if no one comes up with a solution.

Comments

Robert_W’s picture

After doing some investigation (the issue annoyed me :P), I found out that this error is related to the language variable.

  if (!$event = node_load($values[$field_name][$language][0]['nid'])) {
    return;
  }

After some debugging I discovered that the value in $language (in my case it was 'nl') isn't actually in the $values array. For some reason language is always 'und', it works for me when I changed the code from $language to 'und':

if (!$event = node_load($values[$field_name]['und'][0]['nid'])) {
    return;
}

Maybe I will look further into this issue, but for now it is good for me because the client doesn't sees an error anymore.

MHLut’s picture

This appears to be a duplicate of #1206458: Internal server error 500 after signup

MHLut’s picture

I just changed line 101 in cck_signup.module to
$language = 'und'; // language currently bugged, this should be: $language = $values['language'];
Not the nicest solution, but it will do for now.

liezie_D’s picture

the solution proposed by RobertW worked for me.
But the error is still triggered when removing the signup

kamranzafar’s picture

Issue summary: View changes

I think better solution will be this

$language = (array_key_exists($values['language'], $values[$field_name])) ? $values[$field_name] : LANGUAGE_NONE;

--
Kamran Zafar
Cognitive Axis
http://www.cognitiveaxis.com/

ferrum’s picture

@kamranzafar: your snippet is not correct, change it to:

$language = (array_key_exists($values['language'], $values[$field_name])) ? $values['language'] : LANGUAGE_NONE;

beto_beto’s picture

this error appear for me to

i am still searching for that

but how can i restrict or limit the number of user to register on some event as example i want only 5 people ?