November Happy Hour will be moved to Thursday December 5th.

Commerce 8.16.1 Catalog On Page Edit

Vote:
 

On the Quanta demo site it seems that when going to CMS > Commerce > Catalog and choosing a product you get the ability to edit on page.

In my current implementation I currently get an exception error:

Content with id 60750__catalogcontent was not found

Followed by the stack trace:

[ContentNotFoundException: Content with id 60750__catalogcontent was not found]
   EPiServer.Core.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +471
   EPiServer.Core.DefaultContentLoader.Get(ContentReference contentLink) +68
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.GetCommonDraftContent(ContentReference contentLink) +59
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.GetVersionSpecificContent(SegmentContext segmentContext, CatalogContentBase catalogContent) +130
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.GetCatalogContentRecursive(CatalogContentBase catalogContent, SegmentPair segmentPair, SegmentContext segmentContext, ILanguageSelector languageSelector) +169
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.GetCatalogContentRecursive(CatalogContentBase catalogContent, SegmentPair segmentPair, SegmentContext segmentContext, ILanguageSelector languageSelector) +379
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.GetCatalogContentRecursive(CatalogContentBase catalogContent, SegmentPair segmentPair, SegmentContext segmentContext, ILanguageSelector languageSelector) +379
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.GetCatalogContentRecursive(CatalogContentBase catalogContent, SegmentPair segmentPair, SegmentContext segmentContext, ILanguageSelector languageSelector) +379
   EPiServer.Commerce.Routing.HierarchicalCatalogPartialRouter.RoutePartial(PageData content, SegmentContext segmentContext) +305
   EPiServer.Web.Routing.PartialRouter`2.RoutePartial(IContent content, SegmentContext segementContext) +119
   EPiServer.Web.Routing.Segments.PartialSegment.RouteDataMatch(SegmentContext context) +271
   EPiServer.Web.Routing.<>c__DisplayClass5.b__4(ISegment s) +15
   System.Linq.Enumerable.All(IEnumerable`1 source, Func`2 predicate) +146
   EPiServer.Web.Routing.ContentRoute.MatchSegments(SegmentContext segmentContext) +72
   EPiServer.Web.Routing.ContentRoute.RouteSegmentContext(SegmentContext segmentContext) +13
   EPiServer.Web.Routing.ContentRoute.GetRouteData(HttpContextBase httpContext) +352
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +235
   EPiServer.Web.Routing.RouteCollectionExtensions.HandleRouteData(RouteCollection routes, HttpContextBase context) +33
   EPiServer.Global.DefaultDocumentHandling(Object sender, EventArgs e) +139
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

I have checked our Initialization Modules and it looks like we're setting these correctly:

        public void Initialize(InitializationEngine context)
        {
            var referenceConverter = context.Locate.Advanced.GetInstance();
            var contentLoader = context.Locate.Advanced.GetInstance();

            var commerceRootContent = contentLoader.Get(referenceConverter.GetRootLink());
            var hierarchicalCatalogPartialRouter = new HierarchicalCatalogPartialRouter(() => SiteDefinition.Current.StartPage, commerceRootContent, false);

            RouteTable.Routes.RegisterPartialRouter(hierarchicalCatalogPartialRouter);

        }

Any pointers where I'm going wrong would be great, or what I need to look into.

Thanks,

#149873
Jun 09, 2016 12:50
Vote:
 

Hi, 

So this happens on all of the entries, not just a specific entry?

What do you have if you query the Commerce database with this:

select * from dbo.CatalogEntry where CatalogEntryId = 60750

/Q

#149981
Jun 10, 2016 13:16
Vote:
 

Hi Q,

It happens for all entries!

Running the SQL returns one result - which looks like the correct product.

Thanks

#149982
Jun 10, 2016 13:20
Vote:
 

Hmm - can you edit it in all properties? Or just no editing at all.

#149985
Jun 10, 2016 14:01
Vote:
 

Yeah, editing under all properties is 100% fine, its just the on page edit that doesn't seem to function!

#149990
Jun 10, 2016 15:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.