Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
taxonomy data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Apr 2011 at 14:04 UTC
Updated:
22 Feb 2012 at 23:11 UTC
Comments
Comment #1
merlinofchaos commented%1 will be the name of the taxonomy term actually passed in. I'm guessing from your phrasing that's not the parent.
IN the very latest -dev version of Views, you can also use tokens from the first row in the title. That will get you what you want.
Comment #2
somezing commentedIn the taxonomy view %1 displays the taxonomy ID of the term and not its name, as opposed to what happens when using the same settings in a content view, where the term ID is automatically replaced by its name. This happened both using the current term shown ID through the contextual filter's title override as well as using the current term's parent ID. In all instances I will only get the ID. I assume that is a functionality not available in this kind of view?
(I will wait for the next version to be able to use tokens in the title, for the moment I am using a grouping field as the title unless there is a way to do it through the title overrides... This way I get 2 titles which is kind of unnecessary..)
Thank you.
Comment #3
merlinofchaos commentedIf %1 isn't getting the title, try adding taxonomy term validation. Depending upon the argument you use and the way it validates, it might not be smart enough to automatically convert the tid to a term name, but the validator will do this regardless of what the argument is. Plus, the validator can also reject terms that aren't valid preventing bad queries.
Comment #4
somezing commentedOk, that's weird, I think.
I was already validating using:
validation: taxonomy term
filter value type: term ID
changing
filter value type to: Term Ids separated by , or +
made it work as expected.
I don't know if that's the way it's supposed to be? I hadn't tried that option earlier because I am only supposed to be getting one term ID, so I thought that was the most appropriate option.
Thanks a lot :)
Comment #6
anouIssue closed but i wanted to confirm that comment #4 is the solution at the moment. If you choose filter value to "Term ID" only, it won't work has expected...
Comment #7
Wappie08 commentedYep, #4 works! Really strange.. had to find this thread to learn the trick (so not very logical). Please close again if works as designed!
Greets Wappie
Comment #8
ñull commentedThis issue is not only for parent id, so I changed the title accordingly.
I wonder why it should only do id to text conversion with only that validation. What sense does it make to have the id number in the title at all? That looks like a bug to me. In D6 views I never had this issue. When this works as designed, then the descriptions of these functions should warn the user of this. So no matter how you look it is it remains a bug.
Comment #9
dawehnerAfaik this should have been fixed with #1307162: Undefined index: 0 in taxonomy_term_load() Error
Comment #10
patoshi commentedadding my 2 cents to this.... This was a very weird setup i must say.
I wanted to page title be dynamic and have the taxonomy id term show up via views3. At first I had in override title as "%2", to grab the 2nd argument in the URL, but that doesnt work for some reason. You have to do a %1 to grab the 1st argument, im guessing its grabbing the contextual filters argument selection, not URL.
here is my screenshot: http://prntscr.com/6drgo
hope this helps someone.. and best that someone makes this clearer.