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
Comment | File | Size | Author |
---|---|---|---|
#5 | ctools-limit-terms-to-vocab-1253054-5.patch | 1.9 KB | fabsor |
#4 | ctools-limit-terms-to-vocab-1253054-4.patch | 1.87 KB | BJ___ |
#3 | restrict-vocabularies-1253054-3.patch | 1.86 KB | markusbroman |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedUpdate to change the component arguments -> relationships
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedHm. This would be a CTools thing, not Panels.
Comment #3
markusbroman CreditAttribution: markusbroman commentedPatch 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.
Comment #4
BJ___ CreditAttribution: BJ___ commentedThe previous patch causes an error. Here is a new patch that fixes that
Comment #5
fabsor CreditAttribution: fabsor commentedI 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.
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted.