Jump to:
| Project: | Rules |
| Version: | 7.x-2.x-dev |
| Component: | Rules Engine |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have created a webform asking the user for some information. I have set up Rules so when a webform is submitted, the values that the user has entered are written to his profile. That way his profile information is always updated based on his latest webform submission.
After submitting the form I noticed that all of my fields have a white space character in the beginning. Can't figure out why this is happening. I am certainly not adding any white space when submitting the values.
I am using:
Webform Patched 7.x-3.15 (supports tokens)
Webform Rules 7.x-1.2
Rules 7.x-2.0+15-dev
All of my fields are text fields besides the e-mail field.
For the e-mail field I get an error:
Unable to modify data "user:mail": Invalid data value given. Be sure it matches the required data type and format.
Probably because of the white space in front? I don't know if this could be caused by the patched version of webform that supports tokens. I am using the tokens only for retrieving information from the user profile and displaying it as default values in the form fields, so the user won't have to fill them in if the information is up to date. So tokens don't have to do anything with the "writing".
Here's an export of my ruleset.
{ "rules_whitepaper_download" : {
"LABEL" : "Whitepaper Download",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "webform_rules" ],
"ON" : [ "webform_rules_submit" ],
"DO" : [
{ "data_set" : { "data" : [ "user:field-real-name" ], "value" : "[data:real_name-value]" } },
{ "data_set" : { "data" : [ "user:field-surname" ], "value" : "[data:surname-value]" } },
{ "data_set" : { "data" : [ "user:field-company-name" ], "value" : "[data:company_name-value]" } },
{ "data_set" : { "data" : [ "user:mail" ], "value" : "[data:e_mail-value]" } },
{ "data_set" : { "data" : [ "user:field-phone" ], "value" : "[data:phone-value]" } },
{ "data_set" : { "data" : [ "user:field-fax" ], "value" : "[data:fax-value]" } },
{ "data_set" : { "data" : [ "user:field-address" ], "value" : "[data:address-value]" } },
{ "data_set" : { "data" : [ "user:field-postcode" ], "value" : "[data:postcode-value]" } },
{ "data_set" : { "data" : [ "user:field-city" ], "value" : "[data:city-value]" } },
{ "data_set" : { "data" : [ "user:field-county" ], "value" : "[data:county-value]" } }
]
}
}Am I missing something?
Comments
#1
Any ideas? Could it be possible that the other modules are responsible for this problem? I am a begginer in Drupal so I need some help on where to start looking for what causes this bug.