0

When testing the DXA 2.0 Example Site it appears the DXA Resolver behaves inconsistently.

For instance when publishing the 'Sitemap' page, the 'Sitemap' article DCP is resolved and published. This can be validated by viewing the 'Show Items to Publish' in the publish dialog.

However when publishing the '000 Home' page, the 'Homepage Welcome' article DCP is not resolved or published. When validated by viewing the 'Show Items to Publish' in the publish dialog, the 'Homepage Welcome' article is not shown.

What is causing this behavior?

1 Answer 1

3

After some investigation it turns out the DXA Resolver throws an error when two components on the page link to the same component (i.e. on the '000 Home' page both the 'Homepage List' and 'Latest News' components link to the same 'News Intro' component). In this case the DXA Resolver throws the following error:

Gathering linked components for component Latest News
Exception occured: An item with the same key has already been added.
Stacktrace:    at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Sdl.Web.DXAResolver.Resolver.ResolveItem(IdentifiableObject item, ComponentTemplate template, HashSet`1 resolved, Int32 recurseLevel)
   at Sdl.Web.DXAResolver.Resolver.Resolve(IdentifiableObject item, ResolveInstruction instruction, PublishContext context, ISet`1 resolvedItems)

I created an issue on SDL Github to address this issue: https://github.com/sdl/dxa-content-management/issues/35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.