It seems the latest dev release from panels is not respecting the vocabulary selection when creating a relation to use as context for e.g. views 3.

I found this problem while setting up a product catalog for DCommerce which in my case means a product display has a catalog term and general terms.

To reproduce create a content type with 2 term reference fields pointing to two different vocabularies.
Create nodes with terms in both vocabularies.
Create a panel to override the node display and add a relation for multiple terms related to the node, use only the second vocabulary and use the resulting tids as title output for the node.

Expected result: show only the tids from the specified vocabulary
Current result: shows the terms from both vocabularies

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Component: Plugins - arguments » Plugins - relationships

Update to change the component arguments -> relationships

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev
Component: Plugins - relationships » Code

Hm. This would be a CTools thing, not Panels.

markusbroman’s picture

Status: Active » Needs review
FileSize
1.86 KB

Patch created to solve this issue. Added a check to see if vocabularies are checked in $conf before adding the term to $terms array. Also changed from using vocabulary id to using vocabulary machine name as key in $options array.

BJ___’s picture

The previous patch causes an error. Here is a new patch that fixes that

fabsor’s picture

I think we need to check that $conf['vocabulary'] is set to avoid compatibility issues. This patch makes sure the old behavior will be preserved (no filtering per vocabulary) and we should avoid any notices that might otherwise occur.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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