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

CommentFileSizeAuthor
#8 select.inc_.patch425 bytesmatason
#4 select.inc_.patch756 bytesmatason
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

uberellis-dupe’s picture

Priority: Normal » Critical

I can confirm this. Multiple select fields (checkboxes) all export to CSV with value of "No". WebForm analysis displays the correct data.

quicksketch’s picture

Priority: Critical » Normal

Critical 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

holydrupal’s picture

I have the same problem

matason’s picture

Status: Active » Needs review
FileSize
756 bytes

The 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

holydrupal’s picture

I‌ patched it but nothing changed!!

holydrupal’s picture

Priority: Normal » Critical

could someone help us?
the select fields doesn't work in csv and table view.

holydrupal’s picture

anyone can fix this issue, please help us?

matason’s picture

FileSize
425 bytes

OK, 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.

holydrupal’s picture

Status: Needs review » Needs work

still 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

kalee’s picture

the 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!!!

jpsalter’s picture

The suggested change in #8 worked for me.

Thanks!

suit4’s picture

Status: Needs work » Reviewed & tested by the community

I'd like to confirm that the patch from #8 works as expected.

Very nice! Thank you!

holydrupal’s picture

but it sadly didn't worked for me and I don't know why!

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks 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!

Bodo Maass’s picture

Version: 5.x-1.7 » 5.x-1.x-dev

I 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.

Bodo Maass’s picture

Status: Fixed » Active
Bodo Maass’s picture

I 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:

if (in_array($key, (array)$data['value']) === true)

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.

matason’s picture

Bodo Maass, is this working for you with 5.x-1.9? Looks like the check needed to be made against item and key...

richardatval’s picture

Thanks Matason that solved it for me! You have saved me three hours of data entry thanks so much!

quicksketch’s picture

Status: Active » Closed (fixed)

Both 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.