Download & Extend

First taxonomy term dropped from select lists

Project:Views
Version:5.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I recently upgraded several sites to Drupal 5.10 and noticed a bug where the first term in a taxonomy select list was dropped.

The first term was dropped in exposed filter select lists and in the taxonomy term select lists in the view edit form.

I found commenting out this line in views/modules/views_taxonomy.inc (and clearing the views cache) fixed it:

<?php
function views_taxonomy_form(&$vocabulary) {
  if (
$vocabulary->tags) {
   
$form = array('#type' => 'textfield',
     
'#autocomplete_path' => 'taxonomy/autocomplete/'. $vocabulary->vid,
     
'#process' => array('views_taxonomy_process_form' => array()),
     
'#maxlength' => 255,
    );
  }
  else {
   
$form = taxonomy_form($vocabulary->vid, 0, $vocabulary->help);
    unset(
$form['#title']);
    unset(
$form['#description']);
    if (!
$vocabulary->required) {
     
//commented out to fix bug where first term is missing from lists
      //perhaps this is because drupal handles required taxonomy differently now?
      // unset($form['#options'][0]);
   
}
    unset(
$form['#default_value']);
   
$form['#multiple'] = TRUE;
  }
  return
$form;
}
?>

I haven't noticed any side effects and the problem is resolved.

anyway, I hope it helps someone else too.

DT

Comments

#1

Same issue for me with Drupal 5.10 as well.
Thanks for the temporary fix until it's taken care of officially!

#2

Status:active» closed (duplicate)

Marking as duplicate of #142347: Not all taxonomy terms showing up in exposed filter