Hello,
I'm noticing a new issue where emails sent by WebForm are coming without submitted values, e.g.
Submitted on
Submitted by user:
Submitted values are:
The results of this submission may be viewed at:
I'm using default template:
Submitted on [submission:date:long]
Submitted by user: [submission:user]
Submitted values are:
[submission:values]
The results of this submission may be viewed at:
[submission:url]
And if i use a custom template, it's not working either, e.g.:
Submitted on [submission:date:long]
Name: [submission:values:your_name]
Company: [submission:values:company]
Email: [submission:values:your_email]
Additional Info:
[submission:values:additional_info]
The results of this submission may be viewed at:
[submission:url]
However, the values are stored correct in the database and accessible via webform-results without any issue.
I apologize if there's a related ticket on this - i couldn't find one.
Kind regards,
Adon
Comments
Comment #2
Adon Irani commentedJust a follow-up:
in includes/webform_submissions_inc
Prior to webform_replace_tokens in function webform_submission_send_mail:
$email['message'] = string(181) "Submitted on [submission:date:long]
Submitted by user: [submission:user]
Submitted values are:
[submission:values]
The results of this submission may be viewed at:
[submission:url]"
After to webform_replace_tokens in function webform_submission_send_mail:
$email['message'] = string(107) "Submitted on
Submitted by user:
Submitted values are:
The results of this submission may be viewed at:
"
Comment #3
Adon Irani commentedThe token_replace is not functioning in my case. However, I cannot replicate this with my other Drupal sites running on same server using same webform version. Upgrading the the dev branch didn't fix either.
Any leads? Has anyone ever encountered this?
Much obliged,
Adon
Comment #4
Adon Irani commentedIn case this helps anyone ...(it's not a WebForm issue, my apologies)
In my case, the answer is related to the autoslave module: https://www.drupal.org/node/2898888
Also discussed here (not resolved), https://www.drupal.org/node/1265848#comment-12191146
Other mentions online about the PHP memory settings had no effect for me.
Hopefully this helps someone as the issue has been quite elusive.
Comment #5
liam morlandTo make your issue easier to read, please use the "code" or "PHP" buttons in the editor when formatting code. Please make links to other issues as follows so that they become links with the title of the issue: [#nnnnnn]
Do I understand correctly from your last commit that the problem is resolved or at least covered by other issues?
Comment #6
liam morlandPresuming this is fixed. If not, please re-open and provide details.
Comment #8
deanw commentedMost recently for me this issue was fixed by updating the ImageCache Actions module. I believe it was related to "Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4" - https://www.drupal.org/project/imagecache_actions/issues/3117901 since while troubleshooting I noticed the issue did not happen in PHP 7.3. Other modules may have the same issue. Also check your logs for modules triggering issues that my need to be updated. These outdated modules can at times interfere with tokens.