While we are migrating from 2013 Sp1 to Web 8.5 we have Web Application which uses similar code as shown below to retrieve Keywords list which are used in Components

  CompositeFilter emptyFilter = new CompositeFilter();
            Keyword[] selectedKeywords = new Keyword[] { };
            String[] componentURIS = new String[] { "tcm:33-270259-16", "tcm:33-270311-16", "tcm:33-270685-16", "tcm:33-270686-16", "tcm:33-506070-16" };
            TaxonomyRelationManager relationManager = new TaxonomyRelationManager();
            Keyword[] keywords = relationManager.GetTaxonomyKeywords("tcm:33-117-512", componentURIS, selectedKeywords, emptyFilter, 16); 

When I executed Database Profiler I found that the script which is generated is incorrect.

    declare @p1 int
set @p1=1
exec sp_prepexec @p1 output,N'@P0 int,@P1 int,@P2 int',N'select distinct taxonomyit0_.NODE_ID as NODE_ID2_23_, taxonomyit0_.FACET_ISABSTRACT as FACET_IS3_23_, taxonomyit0_.FACET_DEPTH as FACET_DE4_23_, taxonomyit0_.FACET_HASCHILDREN as FACET_HA5_23_, taxonomyit0_.FACET_ID as FACET_ID6_23_, taxonomyit0_.FACET_ITEMTYPE as FACET_IT7_23_, taxonomyit0_.FACET_KEY as FACET_KE8_23_, taxonomyit0_.FACET_LEFT as FACET_LE9_23_, taxonomyit0_.NAMESPACE_ID as NAMESPA10_23_, taxonomyit0_.FACET_ISNAVIGABLE as FACET_I11_23_, taxonomyit0_.FACET_PARENT as FACET_P12_23_, taxonomyit0_.PUBLICATION_ID as PUBLICA13_23_, taxonomyit0_.FACET_RIGHT as FACET_R14_23_, taxonomyit0_.TAXONOMY_ID as TAXONOM15_23_, taxonomyit0_.TOTAL_RELATEDITEMS as TOTAL_R16_23_, taxonomyit0_.FACET_DESCRIPTION as FACET_D17_23_, taxonomyit0_.FACET_NAME as FACET_N18_23_, taxonomyit0_.FACET_ISUSEDFORIDENTIFICATION as FACET_I19_23_, taxonomyit0_.ITEM_SELECTOR as ITEM_SEL1_23_ from TAXFACETS taxonomyit0_ cross join ITEM_CATEGORIES_AND_KEYWORDS relatedkey1_ cross join ITEMS itemmeta2_ where itemmeta2_.ITEM_REFERENCE_ID=relatedkey1_.ITEM_REFERENCE_ID and relatedkey1_.KEYWORD_ID=taxonomyit0_.FACET_ID and relatedkey1_.NAMESPACE_ID=taxonomyit0_.NAMESPACE_ID and relatedkey1_.NAMESPACE_ID=@P0 and relatedkey1_.PUBLICATION_ID=taxonomyit0_.PUBLICATION_ID and relatedkey1_.PUBLICATION_ID=@P1 and itemmeta2_.ITEM_TYPE=@P2 and (relatedkey1_.ITEM_REFERENCE_ID in (270259 , 270311 , 270685 , 270686 , 506070))                        ',1,117,16
select @p1

If anyone faced similar issue while migrating Applications to Web 8.5?

  • 1
    Can you clarify a bit? Why is that script incorrect? Does it throw an error? – Quirijn Dec 3 at 19:00
  • The input parameter is taxonomy id, instead query formed with Taxonomy id, it is mapping to Publication id, which is not giving correct results. – Prasanna K Gollamudi Dec 5 at 4:42
  • The code looks like the example from the SDL Documentation Center. Could you provide the actual code so others could see what's wrong? Are there differences between your original 2013 SP1 environment and the upgrade in terms of code and published Components, Categories, etc.? It's possible it's the upgrade, but for the same query against the same published data, the results should really be the same. Otherwise please log a Support ticket. – Alvin Reyes Dec 5 at 21:52
  • @AlvinReyes I have raised Support ticket, Still I have not received any update, Will provide details once they gave any fix. The problem is The query which getting formed contains taxonomy id 117 value in Publication id. Where as my Publication id is 33. – Prasanna K Gollamudi 2 days ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.