From this months SDL Tridion SDL WCMS newletter there is the following note concerning a bug in the Content Delivery API.
A defect has been reported and validated in the SDL Tridion 2009 Content Delivery API – GetTaxonomyComponentPresentations’
The method ‘GetTaxonomyComponentPresentations’ is returning DCPs from multiple publications – the method is intended to return DCPs only from the same Publication the Taxonomy exists in. As a workaround, you may use a direct Broker Query to retrieve the components tagged with the keyword, then retrieve DCPs based on those components with ComponentPresentationFactory. A JSP sample is provided below.
Query brokerQuery = new Query();
Criteria Criteria1 = new Criteria(
new TaxonomyKeywordCriteria(taxonomyURI, firstkeywordURI),
new TaxonomyKeywordCriteria(taxonomyURI, secondKeywordURI),
String foundItems = brokerQuery.executeQuery();
/* Retrieve componentpresentations */
It’s a shame they have just released Service Pack 1 for WCMS 2009 as this would have been a nice issue to have resolved. I wonder if this will be resolved in Service Pack 2, or added to WCMS 2010.
As always interested to know if anyone has other workarounds than the one above.