Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Function in term_view.inc page_manager_term_view_page() only gets the term and not the depth, even though the task's arguments include a depth.
Comment | File | Size | Author |
---|---|---|---|
#1 | term_view_depth-1558734-1.patch | 1.04 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI rolled this against 7.x-1.0 for expedience.
Comment #2
Ashlar CreditAttribution: Ashlar commentedI was reviewing CTool code and checked out your issue, but have a question. I tracked the use of the function ctools_context_handler_get_task_contexts and could not find a circumstance where it requires the $depth variable. Which $task are you referring to and/or why is depth required? Also what is the result of having the argument missing?
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedctools_context_handler_get_task_contexts() is a function that is called by all task handlers that use context not just terms. As such, it doesn't expect a depth but rather an array of all contexts. The task I'm talking about is the one I patched: term_view.inc.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedThe problem is that the depth was eliminated from taxonomy/term/%term in D7.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedIf you enable the task handler for term_view, enable the taxonomy_term view that is included with Views, and apply the patch, you can get all that back.
taxonomy/term/[tid]/[depth] works
taxonomy/term/[tid],[tid],[tid]/[depth] works too.
Views can accept a depth argument, but the CTools term handler never passes the depth argument even though the taxonomy term context argument sets it up.
Comment #6
Summit CreditAttribution: Summit commentedHi, It would be great to have the term-depth back into ctools. I am allready over a year searching for a good way to handle different ctools-panels based on the term depth.
Sorry if this comment is out of topic. But I think taxonomy depth is a valuable mechanism!
Greetings, Martijn
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedI agree it's valuable, I was just concerned about the implications. But I'd rather have the feature available. I don't think it'll break anything.
Comment #8
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted and pushed.