Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have just upgraded to version 5.x-1.7 from 4.7.
Everything s fine... almost
Some data in the csv file are not properly exported, like for example the result of the multiple select lists where all the result are NO meanwhile some are selected as it can be seen in the table page. In another multiple select, only the first choice in exported to csv.
Anybody got this problem?
Thanks.
Michael
Comment | File | Size | Author |
---|---|---|---|
#8 | select.inc_.patch | 425 bytes | matason |
#4 | select.inc_.patch | 756 bytes | matason |
Comments
Comment #1
uberellis-dupe CreditAttribution: uberellis-dupe commentedI can confirm this. Multiple select fields (checkboxes) all export to CSV with value of "No". WebForm analysis displays the correct data.
Comment #2
quicksketchCritical is for issues that render the module inoperable. I'm not working on webform much these days but trying to keep the bugs down. I'd appreciate any patches that could be contributed to fix this problem
Comment #3
holydrupal CreditAttribution: holydrupal commentedI have the same problem
Comment #4
matason CreditAttribution: matason commentedThe problem appears to be in components/select.inc
I've attached a patch, use at your own risk - comments appreciated :)
Drop the file select.inc.patch into webform/components/ and run patch < select.inc.patch
matason
Comment #5
holydrupal CreditAttribution: holydrupal commentedI patched it but nothing changed!!
Comment #6
holydrupal CreditAttribution: holydrupal commentedcould someone help us?
the select fields doesn't work in csv and table view.
Comment #7
holydrupal CreditAttribution: holydrupal commentedanyone can fix this issue, please help us?
Comment #8
matason CreditAttribution: matason commentedOK, my original patch grouped all the values selected into a single cell (similar to the results table view), this patch should however fix it properly. Revert to the original select.inc before applying this patch.
Comment #9
holydrupal CreditAttribution: holydrupal commentedstill some keywords in csv and table is the key not the label.
what I did:
replace the patched select.inc with the original one
replace the line
generate the csv
viewing the table view
Comment #10
kalee CreditAttribution: kalee commentedthe patch code worked for me...
i replaced the line that said "-" in the patch code that matason gave us with the line that said "+".
Thanks to you!!!
Comment #11
jpsalter CreditAttribution: jpsalter commentedThe suggested change in #8 worked for me.
Thanks!
Comment #12
suit4 CreditAttribution: suit4 commentedI'd like to confirm that the patch from #8 works as expected.
Very nice! Thank you!
Comment #13
holydrupal CreditAttribution: holydrupal commentedbut it sadly didn't worked for me and I don't know why!
Comment #14
quicksketchThanks everyone for the great collaboration on this fix. Extra kudos to matason for coming up with the patch :D
I'm running through the queue this week and this'll be included in the 1.8 release. Thanks!
Comment #15
Bodo Maass CreditAttribution: Bodo Maass commentedI still have this problem in 5.x-1.x-dev, so if the patch has indeed been committed in 5.x-1.8, it didn't work for me.
Comment #16
Bodo Maass CreditAttribution: Bodo Maass commentedComment #17
Bodo Maass CreditAttribution: Bodo Maass commentedI found that reversing the patch from #8 made it work for me again.
Line 431 of select.inc (from 5.x-1.x-dev) should be:
The patch from #8 changed this into if (in_array($item...
However, this is almost certainly problematic even if it might work in some cases. $item will be the translatable display name of the item, and that should not be used as key.
It seems that we have different uses cases here (check boxes, lists, radio buttons, and also items with or without display names). Could the people for whom the patch from #8 worked explain their use case?
For me, I used a checkbox with a display name. In that case the patch broke it.
Comment #18
matason CreditAttribution: matason commentedBodo Maass, is this working for you with 5.x-1.9? Looks like the check needed to be made against item and key...
Comment #19
richardatval CreditAttribution: richardatval commentedThanks Matason that solved it for me! You have saved me three hours of data entry thanks so much!
Comment #20
quicksketchBoth keys and items are being checked in the latest versions of 1.x and 2.x. Please open a new ticket for any new problems with this issue.