The selected values of a grid component are not visible in the notification e-mail. This bug was introduced when issue #1151714 was fixed, because #grid_options was introduced and not properly checked for in the theme function. The commit that broke this function was 17984ee97933bdbd5821899c06ae48b8c45338bf on May 9th, 2011.
In line 277 of grid.inc, #options should be replaced twice by #grid_options. I have not included a patch because it is an easy replacement.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | webform-1168366-10.patch | 1.01 KB | traviscarden |
Comments
Comment #1
quicksketchThanks, I had MIME-Mail installed when I did the testing so I didn't notice that the plain-text e-mails weren't sending the Grid component. I'll fix this next time I'm working on Webform.
Comment #2
dutchie76 commentedHi,
Yes this is a real problem for us as parts of our webform are not being emailed.
Thanks quicksketch for the quick solution : ))))
Please could you fix as soon as you can.
Thanks for your efforts.
dutchie
Comment #3
quicksketchCritical issues are those that make the module completely unusable, such as unable to install or PHP errors.
Comment #4
Jorrit commentedquicksketch: I have the feeling that you underestimate the problems this bug causes for users of this module. To me, it is hard to understand why in such a late release of this branch of the webform module this bug was introduced. According to me, issue #1151714 was a refactoring request and should not have been implemented in a mature code branch, but postponed to a future major version. A version .11 should not introduce regressions like this.
Comment #5
vernond commentedJorrit: Please bear in mind that you are not speaking to an employee. As you indicate, it requires a trivial editing fix. You have helped the community in two ways: a) Identified the problem; b) Put forward a solution to the problem.
This is community driven software that you too benefit from, so hopefully you do not feel too put out at having given something back.
From where I sit, it would require a full-time team of experienced software testers to test every logic path within Webform across every possible site and server configuration to guarantee a 100% bug-free Webform release. That is where the rest of us fit in. By my reckoning quicksketch could probably do with a little less noise on his lines considering the work he does which we all benefit from.
On behalf of everyone making use of Webform, thanks again for spotting the problem and identifying the fix.
Comment #6
PipB commentedMaybe it's an idea to install Mimemail.....as a workaround for the time being.
But I just tested this one and it didn't work, HTML mail also didn't work.
Ik did a Fallback to Webform 6.x-3.10 and grid values are displayed in the email.
And quicksketch: sorry for Jorrit....
Comment #7
quicksketchYes to really prevent problems like this in the future, we need more extensive SimpleTests. Right now the only SimpleTests in place ensure that forms save, insert values, update values, work across multiple pages, and don't corrupt any data in the process. This basically prevents any permanent damage to people's data or things that would require an update hook to fix. Tests for e-mail, CSV/Excel downloads, Select or Other integration, Options Element integration, MIME Mail support, conditional fields, and many, many other aspects of Webform are not yet checked in our tests. Refactoring to add new functionality while maintaining our existing APIs is perfectly reasonable, we just need better tests to ensure things don't break like this.
Comment #8
j0rd commentedSame problem.
While you're at it, could you add an extra line of white space between the each of the values in plain text emails.
The emails have no white space and it's hard to read with all the information bunched up.
Comment #9
druliner commentedj0rd: RE: Whitespace
I just had a user complaining about this. It turns out her mail client (M$ Outlook) was "removing extra line breaks" from emails which caused the whitespace to collapse. She turned off that option in Outlook and now her webform emails look fine.
Comment #10
traviscarden commentedHere's a patch with Jorrit's proposed fix. It works for me. If a few more of us can test and report on it, we can mark this RTBC and help quicksketch get this rolled out faster!
j0rd and druliner, it is considered best practice to only address one bug or request per issue. If you'd like a change made to email formatting, you'll get the best response by opening a separate issue for that request (once you've searched for existing issues to confirm that no one's already asking for the same thing somewhere else). :)
Comment #11
squaretone commentedthis patch worked great on my dev environment. grid values now show up in emails.
thanks for stepping up to sub a patch!
Comment #12
nicktech commentedI can confirm that the #10 patch does work. Thanks a bunch!
Comment #13
PipB commentedI can also confirm that patch #10 works.
Thanks!
Comment #14
quicksketchI've committed #10 to both D6 and D7. D7 actually had a different problem, where it was displaying "keys" instead of "values", rather than not displaying anything at all like the D6 version.
Comment #16
athreya86 commentedI'm quite new to drupal and the forum - I hope I'm posting it in the right place(the ticket is already closed?)
The project I'm working on uses drupal 6 and the webform module. The selected values of the grid element is still not visible even though '#options' is replaced twice by #grid_options in theme_webform_display_grid(). What is peculiar is that the keys are visible in the mail.
Any suggestions on how to debug this issue?
Thanks a lot
Comment #17
thommo_nz commentedOkay, like any noobie I'm not sure if this is the right place - but here goes.
I'm a heavy user of Webform in our Drupal environment. I'm not the system administrator (who is just responsible for administering the system overall, not for individual areas), and I cannot find anyone who can explain or detail the complexities of the 'GRID' function in Webform.
I've looked at the documentation for Webform but cannot get my head around the answer.
I want to create a piece on my webform using a grid. The individual questions are placed at the header (left) of each row, and a rating from 0-5 form the columns. Its basically a 'How do you feel about the following statements' deal. 0 Don't know, 1 strongly disagree... 5 strongly agree. No problems so far...
I want to create TWO emails on submission of the form, one that contains the written details, the other that contains a string of numbers that represent the VALUES provided to each answer.
Example:
On the form there is a field on the form called 'Question_Grid'.
Question 0 Don't Know to 5 Strongly Agree
The Group answered my questions in a professional manner - 0 1 2 3 4 5 (4 chosen)
The group were difficult to contact - 0 1 2 3 4 5 (1 chosen)
Resultant emails:
First E-mail
1. Group answered questions in professional manner - 4 (Agree)
2. Group were difficult to contact - 1 (Strongly Disagree)
Second E-mail
4,1
When I use %value[Question_Grid][key] I thought I would be able to focus in on the response given by the form user to each individual question, but instead I find that [Question_Grid] repeats the whole grid and then [key] gives me the response provided.
I'm happy to rework the form so that each question is in its own grid if that helps, however each time the question grid gets repeated. (I dont want the questions, I simply want the responses).
Any pointers will be gladly received.