try
{
var key = new Guid(productKey);
return merchello.Query.Product.GetByKey(key);
}
catch (Exception ex)
{
MultiLogHelper.Error
As there is no chosen value, the catch block is entered and an error log created. However, this is not an error. No value has been chosen. Is this a bug?
Incorrect error logging
In Umbraco I have created my own content type that includes an optional Merchello Product Picker field.
I read the value in code like this:
When a product is chosen, everything works as it should and I read the guid of the selected product.
However, as it's an optional field, the value can be left blank.
When it is left blank, the GetValue code above ends up executing this Merchello code:
As there is no chosen value, the catch block is entered and an error log created. However, this is not an error. No value has been chosen. Is this a bug?
is working on a reply...