I ran into this problem recently and while in the end it’s quite simple issue (Everything is simple if we understand it, right?), it costed me quite many hairs in the process – as it involved debugging with 3 solutions – Find.Commerce (where the problem appears), Commerce (where the router does the work), CMS Core (where the routers are handled). It was both fun, and confusing.
The problem as a customer has this code in an initialization module:
var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>(); var referenceConverter = ServiceLocator.Current.GetInstance<ReferenceConverter>(); var firstCatalog = contentLoader.GetChildren<CatalogContent>(referenceConverter.GetRootLink()).FirstOrDefault(); var partialRouter = new HierarchicalCatalogPartialRouter(() => SiteDefinition.Current.StartPage, firstCatalog, false); routes.RegisterPartialRouter(partialRouter);
Continue reading “Find indexing job + HierarchicalCatalogPartialRouter: A note”