Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2008 at 03:18 UTC
Updated:
13 Sep 2008 at 15:59 UTC
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
Comment #1
Squirrelly commentedSame issue for me with Drupal 5.10 as well.
Thanks for the temporary fix until it's taken care of officially!
Comment #2
sunMarking as duplicate of #142347: Not all taxonomy terms showing up in exposed filter