1

When loading SellableItems in the Content Editor that have a XC9 Entity Composer template property without value (no RawValue key present in JSON) the CatalogDataProvider throws an error:

GetItemFields(ItemDefinition item, VersionUri version, CallContext context)
Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
Sitecore.Data.FieldList.Add(ID fieldId, String value)

This results in not having any values shown in the Sitecore Content Editor for Sellable Items.

2 Answers 2

1

This line in the ReadOnlyCatalogDataProvider causes it:

fieldList1.Add(templateField.ID, property[(object) "Value"].Value<string>());

When changing it to:

var val = property[(object)"Value"].Value<string>() ?? String.Empty; fieldList1.Add(templateField.ID, val);

This is registered as bug by Sitecore support by reference number #40914.

1

In case someone is still looking at a proper solution to be able to see those values in Content Editor, please overwrite GetCategoryBlock inside IGetCategoryConnectPipeline in Commerce. This Block doesn't set the RawValue as Value which causes the issue. I have written a blog to do a proper fix for this http://codeconcerns.com/sitecore-commerce-composer-important-tips-for-using-the-powerful-business-tool/

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.