Hey there,

On my site I have user profile locations like "New York, NY" and "Atlanta, GA". Views handles this well but I found a problem in the code that renders the exposed form for such a field.
In the file /views/modules/profile/views_handler_filter_profile_selection.inc on line 17,

    $field = $all_options[$this->definition['fid']];

    $lines = split("[,\n\r]", $field->options);
    foreach ($lines as $line) {
      if ($line = trim($line)) {

which should be:

    $field = $all_options[$this->definition['fid']];

    $lines = split("[\n\r]", $field->options);//removed the ","
    foreach ($lines as $line) {
      if ($line = trim($line)) {

It's correct in /views/modules/profile/views_handler_field_profile_list.inc so it was easy for me to find and fix the problem. I don't have the knowledge or software to make a proper patch, so I'm posting the code here for someone to hopefully see and fix.

Thanks,
Love the module

-Josh

Comments

dawehner’s picture

  if ($field->type == 'list') {
    $output .= ' '. t('Put each item on a separate line or separate them by commas. No HTML allowed.');
  }

I would say this is by design of drupal core.

dawehner’s picture

Status: Active » Closed (works as designed)

Update status.

I'm wondering why your profile settings works as expected.

emilyf’s picture

jguffey's fix worked for me; was experiencing the same behavior on 6.x-2.8