Hi there,
I've a view that is based on the taxonomy_term_data table that displays some information about the nodes attached to taxonomy terms, as well as the terms themselves. Oddly enough, the view shows everything perfectly in "preview" mode, however, both the page and block display don't show anything when I actually navigate to those on the site (and devel suggests that the views query isn't executed either).
Interestingly enough, if I remove all taxonomy fields (like term name or term description) from the fields list, the view shows up nicely on the page too.. So what could this be??
I know that cases like these are usually permissions issue, but I'm testing as admin, so shouldn't be having an issue with permissions really.
PS. I cleared cache tons of time in between, and tested with clean garland theme, so that should eliminate some things.
Thanks in advance for your help!
Cheers,
Martin
Comments
Comment #1
dawehnerIt would be somehow also be interesting to know how you actually setup your view :)
Comment #2
arski commentedhehe, indeed.
So I was more or less able to isolate the issue now: when I add a relationship to the view which is a node reference field inside the taxonomy - the view stops showing in live mode. The only thing that is set in the view is for it to show one fields: taxonomy term name.
This is the query executed without the relationship in preview mode:
This is what gets done with it (in preview mode again):
i18n is also enabled on the site and for the taxonomy (set to the 2nd, "Localize" option for the vocabulary that has terms with that relationship) Disabling translation options for the terms in the vocabulary didnt seem to have any effect.
Let me know if you need more :)
Comment #3
arski commentedanything else I can add to help? :(
Comment #4
arski commentedHm, same happens when I add a term reference field to my content type, and then add that as a relationship in my node-based view.. so basically doing it the opposite way around now, but same issue.
Comment #5
arski commentedto be more precise, the view shows correctly when the relationship is added, but no fields are using that relationship.. as soon as I add one field nothing is shown on the end page.. hmm
Comment #6
arski commentedIsolated the above bug to be caused by the "Select nodes by language" setting of the Translation Select module - when that is enabled, the view doesn't show any results.
The content type in question is set to "Set current language as default for new content." and the nodes themselves have all either "English" or "French" selected. The referenced taxonomy terms come from a vocabulary that has "Localize. Terms are common for all languages, but their name and description may be localized." set.
Please let me know if you need any further details. (Most details come from op and comment 4)
Thanks
Comment #7
jose reyero commentedTranslation Select shouldn't be rewriting views queries (as default we skip all queries tagged with 'views').
Now if you remove that tag from the module options, you better know what you are doing.
(Will we need to hardcode that tag so people don't mess with the options and say it is a bug?)
Comment #8
arski commentedI actually have the 'views' tag set in the module options, so as you said it shouldn't be rewriting these queries.. but somehow it still is (or so it would seem).
(Switching back to bug report as it's not what you thought it was it seems).
Comment #9
jose reyero commentedIs it possible that the query is not tagged as a 'views' query?
Comment #10
arski commentedI dunno, how do I check? From what I can tell the query is not executed at all on the actual page at all (judging from the list of queries from devel) - just in preview mode inside the view.. it's all very weird really. Let me know what I can do to provide more info.
Cheers
Comment #11
guictx commentedI was having the same problem and solved it by disabling "SQL Query Rewriting" in the Query settings.
Comment #12
arski commentedthanks! did the trick for me :)
Comment #13
jose reyero commented@gictx,
Where's that 'query settings' (I cannot find that option on Views settings) ?
Comment #14
guictx commentedYou have to open a view, expand the Advanced options in the right column and it's bellow "Use aggregation".
Comment #15
jose reyero commentedI think I know what's going on.
Language selection (altered queries) depends on path, so it may work or not on admin/ pages, may be different for the ajax callback showing the query preview, and again different for the actual page showing the query.
This is complex enough for a minor issue, so if you want this fixed: Don't use Language selection.
Comment #16
jose reyero commentedOr, I don't know, maybe fixed by this one? #1601828: Improve Content selection, restrict queries using it, decouple it from 'access' not using it for multiple entity loading.