I have a view with one table and one attachment display.
The table simply lists nodes of type "Newsletter issue", the attachment takes as an argument the creation year and shows a list of years (styled as tabs) above the table.
Except the argument of the attachment both view displays share the same default settings for fields (title, c.date), sort criteria (sticky, c.date) and filters (n.type, published, taxonomy term).

Worked very well for Views 6.x-2.2, but when I upgraded to 2.3 the attachment had no output anymore (the year tabs disapperad).

Using devel module I examined the SQL query of the attachment view:
(same type of view but lists story nodes)

SELECT EXTRACT(YEAR FROM((FROM_UNIXTIME(node.created) + INTERVAL 3600 SECOND))) AS created_year,
   COUNT(DISTINCT(node.nid)) AS num_records
 FROM d6_node node
 LEFT JOIN d6_term_node term_node ON node.vid = term_node.vid AND term_node.tid != 40
 WHERE (node.type in ('story')) AND (node.status <> 0) AND (term_node.tid = 40)
 GROUP BY created_year
  ORDER BY created_year DESC LIMIT 0, 10

The problem seems to be the constraint term_node.tid != 40 in the line of the LEFT JOIN.
Why does a "not equals" operator appear here??

I found that this problem only occurs when using the "is one of" handler in taxonomy term filter, so as a temporary workaround one can just use "is all of" when only one term is selected.

CommentFileSizeAuthor
#9 home_news_events_highlights.txt18.27 KBgarryh

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

I would need to see the view export in order to answer this question. Too many settings, etc.

andreiashu’s picture

@mindgame: do you use Calendar Views ?
I'm not sure if this is because of Views or Calendar but i am getting the exact same behaviour with Calendar (I also get the "term_node.tid !=" ).
I reported it (exported view + actually ran queries) here #312963: Taxonomy id filter not working

andreiashu’s picture

Status: Postponed (maintainer needs more info) » Active

Setting this as active, because I think i provided all the necessary info in that port. I don't think I should repost it here because as i said i'm not really sure who's fault is this: Calendar or Views (I incline to this it is Calendar's fault though).

merlinofchaos’s picture

mindgame’s picture

@andreiashu
No, I don't use Calendar views.

@merlinofchaos
If you tell me what you changed or at least in which file/function, I could check whether the fix of #373155 also solves my problem.

andreiashu’s picture

@merlinofchaos
thanks !

@mindgame
I downloaded the latest dev snapshot of Views and it indeed fixes this problem.

merlinofchaos’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

garryh’s picture

StatusFileSize
new18.27 KB

I can confirm that this is still an issue.

If and only if the attachment filter taxonomy term is the same as the block it is attached to, the attachment displays nothing. The workaround as described by mindgame is a huge help (Thanks!)

mindgame: 'I found that this problem only occurs when using the "is one of" handler in taxonomy term filter, so as a temporary workaround one can just use "is all of" when only one term is selected.'

View export attached.

garryh’s picture

Status: Closed (fixed) » Active
merlinofchaos’s picture

Status: Active » Closed (fixed)

garryh, are you re-opening this because you've checked the current -dev version, where the patch exists, and have confirmed that the fix did not help, or are you just checking the 2.3 version, where the bug is known to exist and are not attentive enough to realize that this is fixed?

Since you didn't change the version, I'm going to assume the latter, and I chide you for wasting my time.

mindgame’s picture

I'm currently using Views 2.5 and for me the workaround that I suggested above is not necessary anymore.
("is all of" can be set back to "is one of")