2

Hi I am trying to fetch sitemapsubtree for docs publication using DXA 2.2 application which is calling GraphQLModelServiceProvider.GetChildSitemapItems method, but i am getting error

ERROR [http-nio2-8081-exec-8] ContentAPIGraphQLExecutor - Errors: [ValidationError{validationErrorType=UnknownType, queryPath=null, message=Validation error of type UnknownType: Unknown type Ancestor, locations=[SourceLocation{line=1, column=100}], description='Unknown type Ancestor'}, ValidationError{validationErrorType=UnknownArgument, queryPath=[sitemapSubtree], message=Validation error of type UnknownArgument: Unknown field argument ancestor @ 'sitemapSubtree', locations=[SourceLocation{line=2, column=111}], description='Unknown field argument ancestor'}]

tried to debug graphQL model service provider got following graphq query

query sitemapSubtree($namespaceId: Int!, $publicationId: Int!, $taxonomyNodeId: String, $ancestor: Ancestor, $contextData: [InputClaimValue!]) { sitemapSubtree(namespaceId: $namespaceId, publicationId: $publicationId, taxonomyNodeId: $taxonomyNodeId, ancestor: $ancestor, contextData: $contextData) { ...TaxonomyItemFields ...RecurseItems } }

fragment TaxonomyItemFields on TaxonomySitemapItem { id title originalTitle url type visible description key abstract classifiedItemsCount }

fragment RecurseItems on TaxonomySitemapItem {
  items {
    ... on TaxonomySitemapItem {
      ...TaxonomyItemFields
      items {
        ... on TaxonomySitemapItem {
          ...TaxonomyItemFields
          items {
            ... on TaxonomySitemapItem {
              ...TaxonomyItemFields
              items {
                ... on TaxonomySitemapItem {
                  ...TaxonomyItemFields
                  items {
                    ... on TaxonomySitemapItem {
                      ...TaxonomyItemFields
                      items {
                        ... on TaxonomySitemapItem {
                          ...TaxonomyItemFields
                          items {
                            ... on TaxonomySitemapItem {
                              ...TaxonomyItemFields
                              items {
                                ... on TaxonomySitemapItem {
                                  ...TaxonomyItemFields
                                  items {
                                    ... on TaxonomySitemapItem {
                                      ...TaxonomyItemFields
                                      items {
                                        ... on TaxonomySitemapItem {
                                          ...TaxonomyItemFields
                                        }
                                        ... on PageSitemapItem {
                                          ...TaxonomyPageFields
                                        }
                                      }
                                    }
                                    ... on PageSitemapItem {
                                      ...TaxonomyPageFields
                                    }
                                  }
                                }
                                ... on PageSitemapItem {
                                  ...TaxonomyPageFields
                                }
                              }
                            }
                            ... on PageSitemapItem {
                              ...TaxonomyPageFields
                            }
                          }
                        }
                        ... on PageSitemapItem {
                          ...TaxonomyPageFields
                        }
                      }
                    }
                    ... on PageSitemapItem {
                      ...TaxonomyPageFields
                    }
                  }
                }
                ... on PageSitemapItem {
                  ...TaxonomyPageFields
                }
              }
            }
            ... on PageSitemapItem {
              ...TaxonomyPageFields
            }
          }
        }
        ... on PageSitemapItem {
          ...TaxonomyPageFields
        }
      }
    }
    ... on PageSitemapItem {
      ...TaxonomyPageFields
    }
  }
}

fragment TaxonomyPageFields on PageSitemapItem { id title originalTitle url type publishedDate visible }

with following variable

{"namespaceId":2,"publicationId":32707,"taxonomyNodeId":"t1","ancestor":"INCLUDE","contextData":[{"type":"STRING","uri":"dxa:modelservice:model:type","value":"R2"},{"type":"STRING","uri":"dxa:modelservice:content:type","value":"MODEL"},{"type":"BOOLEAN","uri":"taf:tcdl:render:link:relative","value":"true"},{"type":"BOOLEAN","uri":"dxa:modelservice:model:entity:relativelinks","value":"true"}]}

It is saying Unknown type ancestor, please advise what needs to be done to resolve this error.

  • I see the error mentions "taxonomy". Have you verified that your Category (taxonomy) is published? – Nickoli Roussakov Sep 16 at 11:19
  • I am not sure category can be published separately in tridion docs, taxonomy here in error i think meant by Map's table of content – Neetesh Narvaria Sep 16 at 11:23
  • ah, i didn't originally see the that this is a Docs issue. Thought it was Tridion Sites. – Nickoli Roussakov Sep 16 at 12:45
  • Category (Taxonomy) need to be published from Tridion Sites – k951 Sep 17 at 8:04
  • @NeeteshNarvaria: Which version of SDL Tridion Docs and UDP? For me works in TD 14 and UDP 11.1 + DXA 2.2 + Dynamic Documentation Module 2.2, URL localhost:59367/api/sitemap.xml – Velmurugan Oct 8 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.