Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Liam 7 posts 77 karma points
    Aug 03, 2016 @ 22:30
    Liam
    0

    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.

    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.

    Thanks, Liam

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 05, 2016 @ 16:56
    Rusty Swayne
    0

    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?

  • Liam 7 posts 77 karma points
    Aug 06, 2016 @ 13:21
    Liam
    0

    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

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Aug 08, 2016 @ 18:13
    Rusty Swayne
    0

    Hey Liam,

    Were you using SqlCe? I've found and fixed another issue.

  • Liam 7 posts 77 karma points
    Aug 15, 2016 @ 20:06
    Liam
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft