When setting the term_display options for a vocab to "custom" (and possibly others - untested - answer to that would be revealed by a fix anyway I suspect), this destroys the term data in the node object for that vocab.
This data in turn is required by views_attach, if you wish to attach a view to a node, and use data from that vocab to pass in taxonomy context.
Example: I have a location taxonomy. I want the location terms to be displayed "inline" in the node display, so I set the term_display settings to "custom". I also have a node type that relates to location, called "locale". On locale type nodes, I want to display a (views_attach) view of various data.
That data is determined by passing in a token ([term-id]) from the node to views_attach, and henceforth into views.
The term data, however, is trashed by term_display (unset - line 184?), and therefore the token never gets built, and all the views_attach argument handling therefore crashes into the ground and I get no views on my nodes.
Comments
Comment #1
NikLP CreditAttribution: NikLP commentedIf anyone can prove it, this in fact might actually affect all term/taxonomy tokens...?
Comment #2
NikLP CreditAttribution: NikLP commentedFix: turns out that because term_display has a lower weight (of zero) than token (10), no taxonomy (or just specific/term?) tokens get created if the term data has been nixed by term_display, as the term data is already gone before token gets a shout.
Setting the weight of the term_display module to 15 fixed this problem, and I don't foresee any particular issues with that - unless there's some other relative positioning problem, perhaps with node module or taxonomy module.
Otherwise, am suggesting that as a fix.
Comment #3
mastoll CreditAttribution: mastoll commentedInteresting. How do you adjust a module's weight?
Comment #4
NikLP CreditAttribution: NikLP commentedUpdate the weight like this (in SQL shell) - or I believe there is a module that will do it, but I can't remember what it's called...
Someone needs to review this!