Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Exporting Product Catalog to XML file using the method CatalogImportExport() in Mediachase.Commerce.Catalog.ImportExport throws an error

Vote:
 

Hi All, 

We're trying to export the Product Catalog to XML file using the method CatalogImportExport() in Mediachase.Commerce.Catalog.ImportExport but it throws the following error:

System.ArgumentNullException: The provided content link does not have a value. (Parameter 'contentLink')
at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
at Mediachase.Commerce.Assets.ImportExport.CatalogItemAssetImportExport.BuildAssetPath(MediaData imageAsset)
at Mediachase.Commerce.Assets.ImportExport.CatalogItemAssetImportExport.CreateEntryCatalogItemAsset(CatalogItemAssetRow assetRow)
at Mediachase.Commerce.Assets.ImportExport.CatalogItemAssetImportExport.GetEntryAssets()
at Mediachase.Commerce.Assets.ImportExport.CatalogItemAssetImportExport.PrepareCatalogItemAssetCollection()
at Mediachase.Commerce.Assets.ImportExport.CatalogItemAssetImportExport.ExportXml(XmlWriter exportWriter)
at Mediachase.Commerce.Catalog.ImportExport.CatalogImportExport.Export(String catalogName, Stream output, String baseFilePath)


This works fine in lower environments but it fails in PreProduction.

Is there any setting that could cause this that is not active in lower envs but on the higher ones?

EpiServer.Commerce.dll version is 14.23.0

Please advice.

Thanks in advance!

#337409
Mar 19, 2025 18:31
Vote:
 

Are you by any chance using DAM?

anyway we are going to release 14.36 which makes it more robust with exporting the asset path. It's on the way out soon. 

#337411
Mar 20, 2025 8:13
Vote:
 

Hi Quan,

Yes, we're using DAM!

Is there a work around to fix this until the relase of 14.36?

Thanks!

#337428
Mar 20, 2025 16:22
Vote:
 

Unfortunately no, the CatalogItemAssetImportExport is tightly coupled so no workaround at the moment.

In Commerce 14.36 you can implement IAssetUrlResolver to control how you want to generate the path for asset 

#337429
Mar 20, 2025 16:42
Vote:
 

Thanks Quan!

#337449
Mar 21, 2025 23:23
Vote:
 

Hi Quan, thanks for the follow up.

I understand that 14.36 will bring the ability to customize and provide an IAssetUrlResolver but is there a bug tracking the issue on https://world.optimizely.com/support/bug-list for an out of the box Optimizely solution that would restore the export functionality?

Thanks

#337474
Mar 24, 2025 18:55
Vote:
 

Hi, the bug is COM-19582

Commerce can't and should not know about DAM, so with the bugfix, if it sees an asset that path can't be resolved , it will safely ignore that asset and proceed. So you can export successfully but the path for the asset will be left empty. If you implement a custom IAssetUrlResolver however you can build the path yourself depend on specific DAM system. 

#337481
Mar 25, 2025 13:51
Vote:
 

I understand and agree that Commerce does not have to know about the DAM.

Do I misunderstand that any Optimizely client that is already using Commerce and starts using the DAM will see the out of the box export feature broken and unusable?

If that is the case then from our client perspective it is definitely a bug. 

 

 

#337482
Mar 25, 2025 14:21
Vote:
 

yes, we consider that a bug - as I mentioned, COM-19582 

#337483
Mar 25, 2025 14:52
Vote:
 

Hi Quan, I apologize, I missed the bug number in the previous statements. 

Thanks

#337484
Mar 25, 2025 14:55
Vote:
 

No problem, i just got words from QA today that 14.36 is approved so it will be out very soon :)

#337485
Mar 25, 2025 15:02
* 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.