After installing this module I see the following errors
Notice: Undefined index: value in webform_encrypt_webform_submission_presave() (line 93 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Warning: Invalid argument supplied for foreach() in webform_encrypt_webform_submission_presave() (line 93 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Database:
When I try to submit the a Test form which has one File field and one Textfield selected for encryption, I see the following in the database:
mysql> select * from webform_submitted_data\G
*************************** 1. row ***************************
nid: 1
sid: 1
cid: 1
no: 0
data: 1
*************************** 2. row ***************************
nid: 1
sid: 2
cid: 1
no: 0
data: 2
*************************** 3. row ***************************
nid: 1
sid: 3
cid: 1
no: 0
data: 3
*************************** 4. row ***************************
nid: 1
sid: 4
cid: 1
no: 0
data: 5
*************************** 5. row ***************************
nid: 1
sid: 5
cid: 2
no: 0
data: This should be encrypted
*************************** 6. row ***************************
nid: 1
sid: 6
cid: 2
no: 0
data: This should be encrypted
Module Setup:
I've stayed with the out-of-the-box options for now, hoping to isolate what's happening.
$ drush vget enc
encrypt_default_config: "default"
About the environment:
This is a Drupal 7.34 install on vagrant. I'm running the following modules
vagrant@vagrant-ubuntu-trusty-64:/var/www/html$ drush pml | grep Enabled | grep Module | grep -v Core
Administration Coffee (coffee) Module Enabled 7.x-2.2
Administration Module filter (module_filter) Module Enabled 7.x-2.0-alpha2
Chaos tool suite Chaos tools (ctools) Module Enabled 7.x-1.5
Development Devel (devel) Module Enabled 7.x-1.5
Development Module Builder (module_builder) Module Enabled 7.x-2.x-dev
Encryption Encrypt (encrypt) Module Enabled 7.x-2.0
Other Entity API (entity) Module Enabled 7.x-1.5
Other Entity tokens (entity_token) Module Enabled 7.x-1.5
Views Views (views) Module Enabled 7.x-3.8
Webform Webform (webform) Module Enabled
Webform Webform Encrypt (webform_encrypt) Module Enabled 7.x-1.0+10-dev | Comment | File | Size | Author |
|---|---|---|---|
| #5 | webform_encrypt-Undefined-index-value-2413111-#5-7.x-1.1.patch | 1.5 KB | th_tushar |
Comments
Comment #1
rgchi commentedIn trying to explore the issue a bit I added a dsm of what looks like the offending undefined index.
The DSM shows $submission->data[$cid] shows
Perhaps removing ['value'] would remove that error?
Comment #2
rgchi commentedSo yeah. It looks like removing the ['value'] would solve the issue of data going in at least.
Comment #3
alexgreyhead commentedI've also run into this problem and, from what I can tell, it's a critical bug in the latest 1.1 release because the data simply isn't being encrypted, hence changing the status.
Thanks for your investigation work, rgchi.
I don't know who the maintainer is otherwise I'd be happy to give them a gentle nudge that this is happening.
Alex
Comment #4
alexgreyhead commentedJust to clarify, I can confirm the patch in #2 fixes my problem and data is saved correctly.
Now I just need to fix the problem that e-mails are being sent with an encrypted "from" name. :) :(
Comment #5
th_tushar commentedHello All,
Got the following errors/warnings while webform submission using webform_encrypt module,
Notice: Undefined index: value in webform_encrypt_webform_submission_presave() (line 93 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Warning: Invalid argument supplied for foreach() in webform_encrypt_webform_submission_presave() (line 93 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Notice: Undefined index: value in webform_encrypt_webform_submission_presave() (line 93 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Warning: Invalid argument supplied for foreach() in webform_encrypt_webform_submission_presave() (line 93 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Notice: Undefined index: value in webform_encrypt_webform_submission_load() (line 109 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Warning: Invalid argument supplied for foreach() in webform_encrypt_webform_submission_load() (line 109 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Notice: Undefined index: value in webform_encrypt_webform_submission_load() (line 109 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
Warning: Invalid argument supplied for foreach() in webform_encrypt_webform_submission_load() (line 109 of /var/www/drupal7/sites/all/modules/webform_encrypt/webform_encrypt.module).
The attached patch will fix the issue.
Thanks,
Tushar
Comment #6
th_tushar commentedComment #7
vj commentedI have tested this patch and resolves issue.
Comment #8
miloshito commentedpatch worked for me. However after i received a HMAC error.
Comment #10
th_tushar commentedCommitted to 7.x-1.2 version. Marking it as fixed.