Copied to clipboard

Flag this post as spam?

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


  • William 2 posts 22 karma points
    Jul 13, 2012 @ 21:20
    William
    0

    Loss of selected media that saves the full xml

    Hi, I’m working on a new site and decided to try out DAMP but I’m experiencing a problem that is driving me crazy.

    After half a day of setting up Umbraco sites and trying different things I think I can finally recreate the issue I’m having.

    • After setting a DAMP property to a file or image occasionally when I saved or saved and published a node and went back later the picker would be empty.

    This is really confusing because the picker would have the media item displayed after saving/publishing and only went away after reloading the node.

    I have set up multiple test sites on a dev server with 4.7.2.497, and DAMP 2.0 from this site. My latest test is a clean install with just DAMP.

    1. Create two Data Types, one DAMP that stores the Id and one that stores the full media xml (for comparing)
    2. Create a document type and add one of each DAMP data type to it
    3. Create a node of that document type and choose your media items for the two properties
    4. Create a new document type with one DAMP data type (doesn't matter which), save
    5. Edit the document type alias and save again
    6. Go back to the node you created and save then reload the node by click its name and the DAMP that stores the full media xml should be empty.

    I guess this only an issue when developing the site if for some reason you decided you want to change the alias (which I did) but can be solved by just saving the id instead.

    But why does changing document type alias affect other DAMP properties and only those that store the full xml?

    And why does the picker display the data but losses it on save and reload but not just reload?

    Any ideas out there?

    (Note that this issue seems a little unpredictable, for example I can't reproduce the issue with DAMP Examples page, but I can by adding them to another document type or by removing the Long Sample, that seems to be different and uses Xpath instead)

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jul 15, 2012 @ 16:55
    Jeroen Breuer
    0

    Hello,

    I'm not sure why DAMP would lose it's data after changing a property alias. You could try to download the source and debug it. Think you'll need to look at the DigibizAdvancedMediaPicker.ascx.cs page.

    Jeroen

  • William 2 posts 22 karma points
    Jul 16, 2012 @ 19:50
    William
    0

    Hi,

    I spent some time debugging the control this morning:

    There were times when the node still had data but wasn't displaying it. The ListViewMediaItem occasionally wouldn't display anything even though it looked like it was receiving the data.

    I noticed that the Value property of the control would always be null even though it is being assigned a value. The only time it wasn't was when I was saving then it had the id of media node.

    Also I noticed that when I did change a document type's alias that ToXMl(XmlDocument data) in DAMP_Data get's called once per DAMP data type (I could see the DAMP data being passed). However I'm not sure if that's the reason and maybe it is just an issue with list view not displaying anything.

    So I think there are two issues:

    • When saving, at some point the data passed into the ToXMl function is null or empty. (I have to look a little further to see where exactly the data is becoming null)
    • Sometimes the list view doesn't bind even though there is data.
  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 14, 2013 @ 12:59
Please Sign in or register to post replies

Write your reply to:

Draft