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.

CommentFileSizeAuthor
#1 term_view_depth-1558734-1.patch1.04 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs review
FileSize
1.04 KB

I rolled this against 7.x-1.0 for expedience.

Ashlar’s picture

I 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?

Anonymous’s picture

ctools_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.

merlinofchaos’s picture

The problem is that the depth was eliminated from taxonomy/term/%term in D7.

Anonymous’s picture

The problem is that the depth was eliminated from taxonomy/term/%term in D7.

If 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.

Summit’s picture

Hi, 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

merlinofchaos’s picture

Status: Needs review » Fixed

I 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.

merlinofchaos’s picture

Committed and pushed.

Status: Fixed » Closed (fixed)

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