Taxonomy Terms do not appear in Filter dropdown menu
dmetzcher - March 7, 2007 - 20:51
| Project: | Views |
| Version: | 5.x-1.6-beta5 |
| Component: | User interface |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
I just created new taxonomy terms for a new content type today, and should see "Taxonomy: Terms for [ContentType]" in the Add Filter dropdown menu. I do not see it, however. I see all the others that I created. I tried to create another set of terms, and I don't see that set either. What could be wrong? I need to use this new set of terms as an exposed filter on the site, but the fact that it doesn't appear in the menu is preventing me from using it.
Thanks for any help that can be provided.

#1
I had the same trouble.
Run update.php either from the address bar or the module settings page
#2
Cool. Thanks!
#3
I assume update.php fixed the problem?
There is a bug in 1.5 that causes Views to not see when taxonomy vocabulary changes. This should be fixed in -dev and will be fixed in 1.6.
#4
To be honest, I cannot remember what fixed it. I found the reply to my issue here after I got it corrected. I know I added something...but I cannot remember what. A new view, maybe...
In any case, if update.php will work next time, that's what I'll do, and I'll check out the dev version when I have a chance.
#5
I also have this problem and I'm using the latest DRUPAL 5 CVS. Also the exposed filters don't respond at all to the attributes set, ie 'Force single' The select boxes look like they do when you add a new node with including the help text etc.
On the views page they don't filter correctly either.
#6
Here's the view incase you need it:
<?php
$view = new stdClass();
$view->name = 'event';
$view->description = 'Event view';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'events';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'calendar';
$view->url = 'events';
$view->use_pager = TRUE;
$view->nodes_per_page = '20';
$view->block = TRUE;
$view->block_title = 'events';
$view->block_header = '';
$view->block_header_format = '1';
$view->block_footer = '';
$view->block_footer_format = '1';
$view->block_empty = '';
$view->block_empty_format = '1';
$view->block_type = 'calendar';
$view->nodes_per_block = '20';
$view->block_more = TRUE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
array (
'tablename' => 'node_data_field_event_date',
'field' => 'field_event_date_value',
'sortorder' => 'ASC',
'options' => '',
),
);
$view->argument = array (
array (
'type' => 'calendar_year',
'argdefault' => '2',
'title' => '%1',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
array (
'type' => 'calendar_month',
'argdefault' => '2',
'title' => '%2',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
array (
'type' => 'calendar_day',
'argdefault' => '2',
'title' => '%3',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node_data_field_event_date',
'field' => 'field_event_date_value',
'label' => '',
'handler' => 'content_views_field_handler_ungroup',
'options' => 'default',
),
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink_with_mark',
'options' => 'link',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'event',
),
),
array (
'tablename' => 'term_node_13',
'field' => 'tid',
'operator' => 'AND',
'options' => '',
'value' => array (
0 => '127',
),
),
array (
'tablename' => 'term_node_12',
'field' => 'tid',
'operator' => 'AND',
'options' => '',
'value' => array (
),
),
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$view->exposed_filter = array (
array (
'tablename' => 'term_node_13',
'field' => 'tid',
'label' => 'City',
'optional' => '0',
'is_default' => '1',
'operator' => '1',
'single' => '1',
),
);
$view->requires = array(node_data_field_event_date, node, term_node_13, term_node_12);
$views[$view->name] = $view;
?>
#7
It is not just that the filter doesn't show any term but also that it breaks any creaed view with a taxonomy filter. In my case, I had a vocabulary with two terms only. Now the filter only shows one of them. This is a critical bug not just for HEAD.
I noted, also, a php error log entry. I don't think it's nothing related to this but just in case:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC LIMIT 0, 15' at line 1 query: SELECT DISTINCT(node.nid), field_data_desenvolupament_value, node.title AS node_title, node.changed AS node_changed FROM node node LEFT JOIN i18n_node i18n ON node.nid = i18n.nid WHERE (i18n.language ='ca' OR i18n.language ='' OR i18n.language IS NULL) AND ( (node.type IN ('portfolio')) ) ORDER BY DESC LIMIT 0, 15There is something missing in between ORDER BY and DESC. The view that causes this error is the standrd view for group homepage in og. Its view form looks ok.
#8
In -dev the problem with the taxonomy multi-select should be fixed; the ORDER BY may be a different problem. If it persists it should be filed as a different bug.
#9
Seeing this issue again. Two of my terms do not appear when I either (1) view the exposed filter in the view's page, or (2) when I edit the view and look under the filters section.
I just upgraded to 5.x-1.6-beta5 with no luck. It's sort of a mess without the terms there, since they are two of the important ones now. Is there a way around this? update.php did nothing for me.
Thanks!
#10
This issue was marked as fixed...but I'm still seeing the same issue that I first reported. And, one of my terms is old...very old. I just noticed it's not in the list. One of the others is there now, and another new one that I created today is not.
Changed from fixed to active.
#11
OK...
I got the new taxonomy term that I just created today to show up. I went into the Categories section...clicked the "edit vocabulary" link, and unchecked the "Required" field. I save the vocabulary, and then edited it again, re-checking the "Required" field (I need it to be required). I went into the view and edited it...my new term was there.
However...the old term, that has been there since the very beginning, is still not appearing. Going to keep fooling around with things. Someone let me know if there is a suggestion. By the way...I KNOW that the missing term was there at some point in the past. I would have noticed, if not.
#12
Well...
I created a new term...that got the old one that was not appearing to finally appear. However...the new one I created was not there. Then, when I deleted the new one I created, the old one disappeared again.
So I decided to try a few things...
1. Added another term ("test1"), the missing term showed, but the new one did not (again).
2. Added a second new term ("test2"). The old one remained, and the second new one showed up, but the first new one still did not.
3. Removed "test1". The old term, and "test2" both still remain.
4. Removed "test2". It is not gone from the view, however.
While all this was happening, I saved the view. I received a SQL error stating that some table didn't exist (something like that). Apparently, VotingAPI is now gone from the "Add Filter" dropdown menu. I was using this to get a sum of the votes for each node, so I could display them in the table view I created. I'm afraid to edit any other views at this point, because I really need this feature and use it all over the place on the site.
So, now...two problems:
1. I have a taxonomy term that I deleted that is still there.
2. VotingAPI fields are gone form the filter select menu.
#13
More issues...
I added two more test taxonomy terms. They both appear...
The old one that kept appearing and disappearing...gone again.
I can't understand this at all. There seems to be no rhyme or reason.
#14
VotingAPI seems to come and go now. Tried clearing the views cache. Nothing changed (except that VotingAPI fields, which came back a few minutes ago, are gone again).
#15
Here is the error I get when viewing a view after the VotingAPI fields disappear:
==========================
user warning: Unknown table 'votingapi_cache_vote_points_sum' in field list query: SELECT DISTINCT(node.nid), node.title AS node_title, node.changed AS node_changed, users.name AS users_name, users.uid AS users_uid, votingapi_cache_vote_points_sum.value AS votingapi_cache_vote_points_sum_value FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_hierarchy term_hierarchy ON term_node.tid = term_hierarchy.tid INNER JOIN users users ON node.uid = users.uid WHERE (node.type IN ('janode')) AND (term_node.tid IN ('89','80','70','79','77','76','72','71','82','60','81','57','62','63','64','75','65','83','61','78')) ORDER BY node_changed DESC LIMIT 0, 50 in /hsphere/local/home/wowguild/hordearmy.com/includes/database.mysql.inc on line 172.
==========================
I have a headache. :-)
#16
I got everything working again (even VotingAPI fields, at least for now), and I think I have found the issue, or at least I've found a way to reproduce the problem.
One of my categories will not appear when the "Required" checkbox is not checked on the "Edit Vocabulary" page. Why would this be?
If I uncheck the box, making the selection of at least one category optional, all the categories in my list will appear in the filter for the view. Check the box again, and the category at the top is gone again. I have deleted the category and recreated it, with the same results every time. It seems to be the one at the top of the list, alphabetically.
Thanks!
#17
Hmmm. something is probably expecting there to be a in there and it's getting removed even when it's not there. I'll look into that.
#18
I'm also seeing this behaviour. It is always the first in the list that is disappearing.
#19
Just chiming in to say we're having the same issue. Thanks and godspeed to the people working on a fix!
#20
I'm having the issue as well.
#21
And I can also duplicate what was said here
When I make the category optional, my taxonomy list is complete.
#22
Word to the last post. Yes, making it not required worked for me too. Would still prefer a fix where I can make it required, but at least I can make all the categories appear now!
#23
A simple, though temporary workaround if the taxonomy term you want to use in the view is not appearing:
1) Create a placeholder category term that would be first alphabetically
2) Create your view using the taxonomy term that was not appearing
3) Delete the placeholder term
The view still works if you do this, though I guess you would need to do the placeholder thing again if you wanted to edit the view. I am guessing this problem has something to do with the View form iteself.
#24
http://drupal.org/node/142347 (contains a patch)