In the text for the select profile field it says to put options on a new line, but commers split the options as well.

Either the text should be changed or commers shouldn't make a new option (at the moment, commers can't be in an option).

This patch does the latter.

CommentFileSizeAuthor
#9 profile-split-field-90221-9.patch738 bytescburschka
profile.patch_1.txt494 bytessym

Comments

edmund.kwok’s picture

http://drupal.org/node/89459 is an example of why this would be a problem. That issue is marked duplicate in favor of patch submitted in this issue. Please generate patch from Drupal root, thanks.

edmund.kwok’s picture

Title: Remove commer from selection field devider » Remove comma from selection field divider of profile.module

Improving the title.

drumm’s picture

Version: x.y.z » 5.x-dev
Status: Needs review » Needs work

We should also update the database so any existing commas become newlines. This will keep the selection options consistent.

edmund.kwok’s picture

Status: Needs work » Needs review

@drumm
I think the patch changes it so that comma won't equal a new option. So there is no need for exiting commas to be new lines.

skippy13’s picture

The change to the split() command works for Drupal 5 as well; but the location is on line 672.

drumm’s picture

Status: Needs review » Needs work

The current state of the user's site needs to be preserved. If we remove commas being an option splitter, then any option lists containing commas are effectively changed without asking or notifying the user.

foo’s picture

I'm in favor of separating on newlines only - commas are often useful when making descriptive, usable form options. Several times I've wanted to use commas, and had to get creative with other, less readable separators.

keenan83’s picture

Has this been solved yet?

cburschka’s picture

Status: Needs work » Needs review
StatusFileSize
new738 bytes

Hasn't. The patch still applies, but with a huge offset; here's a re-roll.

drumm’s picture

Version: 5.x-dev » 7.x-dev
Status: Needs review » Needs work

My comments from #6 are still valid. Existing commas must be converted to newlines to avoid changing the user's site.

And I would like to see this changed in the development version first and then backported as necessary. It will get more reviewers in the development version anyway.

cburschka’s picture

If we change this in multiple branches, where would the user data be changed? profile_update_1?

Jaza’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs work » Closed (fixed)

Hopefully profile.module will be removed in D8 in favour of Field API. So we don't need this patch that changes the storage behaviour of profile.module's internal mechanisms.