Hi, I upgraded to Webform 4.x because I need profile token support and when I submit a webform, I get this error message several times: Notice: Undefined index: value in webform_rules_rules_invoke_event() (line 118 of /var/www/path/to/site/sites/all/modules/webform_rules/webform_rules.module).

Which is this line of code: $data['components'][$component['form_key']]['value'] = $value['value'];

Any ideas on how to fix it? The developer of webform said the only difference between webform 3.x and 4.x is "Use the Webform 7.x-4.0-alpha1 release available on the project page, which includes #1001798: Rewrite token replacement system to use D7 tokens. Other than that it is identical to the current 3.x branch."

I would appreciate any help in figuring out how to fix this, so I can continue to use webform_rules!

Thank you!

Comments

cmejo’s picture

Issue summary: View changes

removed personal info

mvochten’s picture

Hello, I experienced the exact same problem today when upgrading to Webform 4.x.
It is explained on http://drupal.org/node/1609324 that the $submission->values variable structure changed in Webform 4.x, so I figure that's the cause of the problem:

However in 4.x, the superflous "value" key was eliminated to increase consistency in Webform's internal data structures during form processing.

The way I got rid of your particular error message was changing:
$data['components'][$component['form_key']]['value'] = $value['value'];
on line 118 of webform_rules.module, into:
$data['components'][$component['form_key']]['value'] = $value;

This won't fix the entire problem however, since I am still getting notices when accessing values from submitted results of my Webform using the token [data:{component}-value].

stborchert’s picture

Version: 7.x-1.3 » 7.x-1.4
Status: Active » Fixed

Fixed with version 7.x-1.4.
Thanks for the report.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

fixed typo