Error message after a signup:

Notice: Undefined property: stdClass::$sid in signup_rules_signup_data_alter() (line 66 of ...\signup_rules\signup_rules.module).

Comments

Hardik C’s picture

StatusFileSize
new11.96 KB

Hi,

Please replace the signup_rules module with the attached signup_rules module.

It works for me..!!!

Thanks,
Hardik

krex’s picture

I was having the same issue, but this post didn't work for me. It doesn't like there is any change on the affected line (66) between the current 7.x-1.x-dev and the version you have posted here.

  $stored_signup = signup_load_signup($signup->sid);

is the line that's causing the error. I moved it into an else block below "if (empty($signup->sid))" and it seemed to resolve things for me. Here's the code:

  // Check for a signup ID to ensure this is a new signup.
  if (empty($signup->sid)) {
    // Save the signup data before passing it to the rules event so that the
    // new data will exist in the database when it needs to be accessed in actions.
    signup_save_signup($signup);

    // User signed up from node signup form.
    if (!empty($signup_form['signup_form_data']) || !empty($signup_form['signup_anon_mail'])) {
      rules_invoke_event('signup_rules_event_signup_node', user_load($signup->uid), node_load($signup->nid), $signup);
    }
    // User signed up from user registration form.
    else {
      rules_invoke_event('signup_rules_event_signup_register', user_load($signup->uid), node_load($signup->nid), $signup);
    }
  } else {                           //here is where I added the else block
    // This signup has not been saved yet.
    // Load the stored version of the signup for comparison.
    $stored_signup = signup_load_signup($signup->sid);
  }

Please forgive my noob-iness, I am not sure how to submit patches.

jerenus’s picture

This is the patch. hope the problem can be solved.

fonant’s picture

Patch in #3 works fine for me.

jpshayes’s picture

Issue summary: View changes

I am still receiving the following error after patching with #3

Notice: Undefined property: stdClass::$sid in signup_rules_signup_data_alter() (line 66 of /var/www/vhosts/site/example.com/sites/all/modules/signup_rules/signup_rules.module).

Rules 7.x-2.9
Signup Rules 7.x-1.0-beta1+1-dev