I've been trying out Merchello 2.2.0 the past few days and first of all what an awesome product, great work.
I'm trying to add some options to my products and getting an error. I've hooked up it to debugger in VS and the issue is on line 204 in ProductDisplayExtensions.cs where DetachedDataValues is null.
var validPropertyTypeAliases = productAttributeDisplay.DetachedDataValues.Select(x => x.Key);
Knowing very little about what this is supposed to be doing I am not sure what should I do with it?
If I skip this when null my options/variants seem to be added properly in backend but clearly this is in there for a reason that my limited knowledge of Merchello is missing.
Any able to help? I have tried looking through the documentation but no joy.
I'm still in the process of testing 2.2.0 - but I thought I found that one - obviously I missed something somewhere =)
What is happening:
The original IProductAttribute and ProductAttributeDisplay did not have a DetachedDataValues collection. This stores the property values that can now extend a production option choice.
In most cases the collection is deserialized and is instantiated. There must be some place where I need to set it to Enumerable.Empty<KeyValuePair<string, string>>
Sorry it's taken me so long to reply. Great news on the fix.
I am certain I wasn't using SqlCe because I tried installing Merchello into a fresh U7 install (with default CE DB ) and got some errors (can't remember what they were now) After some research someone suggested using full SQL so I started again and continued from there.
I am actually using 2.1.0 anyway now for a project and it's going great.
All the best with 2.2.0, I will be following closely.
productAttributeDisplay.DetachedDataValues not set
Hi,
I've been trying out Merchello 2.2.0 the past few days and first of all what an awesome product, great work.
I'm trying to add some options to my products and getting an error. I've hooked up it to debugger in VS and the issue is on line 204 in ProductDisplayExtensions.cs where DetachedDataValues is null.
Knowing very little about what this is supposed to be doing I am not sure what should I do with it?
If I skip this when null my options/variants seem to be added properly in backend but clearly this is in there for a reason that my limited knowledge of Merchello is missing.
Any able to help? I have tried looking through the documentation but no joy.
Thanks, Liam
Hey Liam,
I'm still in the process of testing 2.2.0 - but I thought I found that one - obviously I missed something somewhere =)
What is happening:
The original IProductAttribute and ProductAttributeDisplay did not have a DetachedDataValues collection. This stores the property values that can now extend a production option choice.
In most cases the collection is deserialized and is instantiated. There must be some place where I need to set it to
Enumerable.Empty<KeyValuePair<string, string>>
Where do you see this occurring?
Hi Rusty,
No problem, thanks for getting back to me.
It's just after adding a variant to a product.
productAttributeDisplay.DetachedDataValues
is null on the following line.https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/Models/ContentEditing/ProductDisplayExtensions.cs#L251
I hope this helps. Hopefully when I really get a feel for the code I might be able to contribute rather than just posting an issue.
Thanks, Liam
Hey Liam,
Were you using SqlCe? I've found and fixed another issue.
Hi Rusty,
Sorry it's taken me so long to reply. Great news on the fix.
I am certain I wasn't using SqlCe because I tried installing Merchello into a fresh U7 install (with default CE DB ) and got some errors (can't remember what they were now) After some research someone suggested using full SQL so I started again and continued from there.
I am actually using 2.1.0 anyway now for a project and it's going great.
All the best with 2.2.0, I will be following closely.
Thanks, Liam
is working on a reply...