For the 'list selection' field types you are supposed to enter the options one per line, the help line below the textarea reads:
'A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'
When the options are parsed, the coma is also used as a separator.
If some of the options have comas in their text they end up broken.
The fix is trivial, just removed the coma from the regular expression in profile_form_profile, line 396. The problem is that some people may have relied on the coma, and after the fix they will end up with unexpected dropdown options.
Two solutions for that:
1. Though luck, they should have respected the instructions and put options one per line.
2. Provide an update function that grabs these values and splits them at comas.
This should really be fixed, very simple, and I would suggestion option 1 above. Without a fix it is impossible to use comas in option values.
Comment | File | Size | Author |
---|---|---|---|
#1 | comma.patch | 704 bytes | mariuss |
Comments
Comment #1
mariuss CreditAttribution: mariuss commentedPatch against DRUPAL-6 branch, really trivial.
Comment #2
Gábor HojtsyIndeed, the 'list' type is what allows commas, and the 'selection' type is what expects each value on its own line. The patch seems to make sense but is hardly critical. Putting in the Drupal 7 queue for review.
Comment #4
mariuss CreditAttribution: mariuss commentedThe patch was sent for Drupal 6. It is not clear against what version was it tested (actually the detailed results are totally useless IMHO, could not get any kind of info from there).
This is a critical issue in Drupal 6 for sure, you cannot use options with commas in the text, that is a bug and there is no workaround. The fix is also trivial.
Why do we have to now wait for another year and another Drupal version for such a simple and obvious fix?
Comment #5
Gábor HojtsyWe don't need to wait for another year/release, but bugs are fixed in Drupal 7 and backported to Drupal 6. This ensures that it will not happen that Drupal 6 gets it fixed, but 7 does not. So the latest release is always the best as well. Let's get this simple patch reviewed and committed in Drupal 7 first!
Comment #6
mariuss CreditAttribution: mariuss commentedSorry, I did not know that this is how it works. Thanks for clarifying.
Comment #7
Dries CreditAttribution: Dries commentedI back-ported this patch to CVS HEAD and committed to CVS HEAD. Thanks mariuss. Setting version to 6.x now for Gabor. :-)
Comment #8
Gábor HojtsyCommitted to Drupal 6, moving down to Drupal 5.
Comment #9
drummCommitted to 5.x.