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

Failed loading content url after saveCatalogNode

Vote:
 

Hi Everyone,

I am trying to call saveCatalogNode of ICatalogSystem inside the PublishedContent event but unfortunately, after clicking publish button I always get this error

after several attempts of figuring the cause, i noticed that as soon as after calling saveCatalogNode, the HttpContext.Current.Request.Url was updated to this wrong url. The correct url in our set up is "epi.cms.contentdata:///1073742255_CatalogContent" but after saveCatalogNode, it added 2122933 on the middle part. Any ideas on why it changes the request url? and is there a way to retain the original one even after calling savecatalognode method? Thanks.

#225680
Jul 23, 2020 8:51
Vote:
 

What does your code look like? 

2122933 is the WorkId which allows the framework to point to your specific published version.

I will move this to Commerce subforum, btw 

#225684
Jul 23, 2020 10:02
Vote:
 

Hi Quan,

This is the code in my PublishedContent method

I am trying to sync the CatalogNode SortOrder with our Category Data Model SortOrder but it seems that after calling SaveCatalogNode, the Request URL is added with the workId. Is there a way where i can bypass this and remove the workid from the request url? or can I retain the original Request.URL which has no workid in it?

PS.

I also tried using IRelationRepository instead but I am not getting any NodeRelations(which CatalogNodeRelation is also blank) so I am stuck on using this path.

Thanks.

#225689
Jul 23, 2020 10: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.