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

Forums / Bugs & Issues / Images and Documents items being locked

Images and Documents items being locked

6 posts, 0 answered
  1. Fernando
    Fernando avatar
    31 posts
    Registered:
    08 Jun 2009
    07 Mar 2011
    Link to this post
    Hi

    I have a sitefinity project with a lot of files in the Images and Documents library. It's happening that sometimes all items get locked by one user. The user didn't locked the items by editing tem, they just became locked after some event we don't know exactly what is.

    Is there some bug that causes that? something to avoid it? or at least a easy way to unlock all items easily?

    thanks,
    Fernando Melo

    UPDATE:

    the sitefinity version is 3.7.2057.2
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    08 Mar 2011
    Link to this post
    Hi Fernando,

    1. Please send the metakeys section you use for Libraries.
    2. Please check whether you have some custom code that works with content items and get a content item into transaction. Locking could happen if someone gets an item and tries to edit it - from the UI or programmatically.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Fernando
    Fernando avatar
    31 posts
    Registered:
    08 Jun 2009
    08 Mar 2011
    Link to this post
    These are the metakeys of the Libraries

    <add key="Libraries.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.Width" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.Height" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.Size" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.Extension" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.AlternateText" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.Description" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" localizable="true"/>
            <add key="Libraries.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
            <add key="Libraries.PermaLink" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />


    I have code working with the libraries, but I don't edit (not that I know), it's just for viewing the content. What is needed to lock programmatically, is there a method to be called to edit and lock the content items?

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Mar 2011
    Link to this post
    Hello Fernando,

    Do you call GetContent in your custom code? This could cause locking of the item. Generally you should use GetCurrentState method of the manager.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Fernando
    Fernando avatar
    31 posts
    Registered:
    08 Jun 2009
    09 Mar 2011
    Link to this post
    There are places where I use the GetContent. But, in most of them, I use it returning an IList, like here:

    Telerik.News.NewsManager newsManager = new Telerik.News.NewsManager("News");
    IList list = newsManager.Content.GetContent();

    And it's not with the LibraryManager. Could it lock the items?

    I also use ContentManager, but to get an specific item, only for Generic Contents and without calling GetContent:

    ContentManager manager = new ContentManager();
    System.Collections.IList content = manager.GetContent(new MetaSearchInfo(MetaValueTypes.ShortText, "Name", Generic_Content_Name, SearchCondition.Equal));
    if (content != null && content.Count > 0) {
       hiddenGCText.Value = ((IContent)content[0]).Content.ToString();
    }


  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Mar 2011
    Link to this post
    Hello ,

    If you do not query the Libraries provider then you do not get the object into a transaction. Unfortunately I cannot tell you what exactly locks the items. We have not encountered the issue locally.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Register for webinar
6 posts, 0 answered