1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / MediaContentSelectorView returning draft version of image

MediaContentSelectorView returning draft version of image

3 posts, 0 answered
  1. higgsy
    higgsy avatar
    336 posts
    Registered:
    05 Aug 2010
    07 Apr 2011
    Link to this post
    Hi,

    I've got the mediacontentselectorview in a control designer im working on. When I select an item in the list, the following code is called:

    imageSelected: function (sender, args) {
     
        //set the global variable SelectedMediaDataItem for use later
        var dataItem = args.get_dataItem();
        alert(dataItem.Id);
        alert(dataItem.Title);
        this.set_SelectedMediaDataItem(dataItem);
     
    },

    When the Id is alerted, it is not the ID of the version of the image in the database that is published. For example, the value 697C9285-665E-4BF6-A689-73020B27BB51 is alerted, and if you look at the attached screenshot from SQL, this is not the LIVe version of the file.

    Is this a bug, or am I doing something wrong?

    Thanks
    higgsy
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    08 Apr 2011
    Link to this post
    Hi higgsy,

    I do not see the the screenshot attached, but looking at the code of the MediaContentSelecorView I see that it gets the items with status LIVE. I suppose that you are not performing the binding.
    The selector should return the correct LIVE items.
    All media items are stored inside [sf_media_content]. There is a column [status] where per persist the item stats

     0 - Master
     1-  Draft
     2 - Live

    All the best,
    Ivan Dimitrov
    the Telerik team

  3. higgsy
    higgsy avatar
    336 posts
    Registered:
    05 Aug 2010
    08 Apr 2011
    Link to this post
    Hi Ivan,

    Ok - if status of 2 is the live version then the mediacontentselectorview is returning the correct version - my mistake. I questioned it because in the sf_media_content table, the version with the status of 0 has a content_state of "published" whereas the other versions do not....but anyway, if zero is the live version then its not a problem.

    Thanks for the clarification.

    Regards,
    higgsy
3 posts, 0 answered