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

Forums / Bugs & Issues / Duplicate Document in library

Duplicate Document in library

4 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    08 May 2010
    Link to this post
    First, this isn't urgent (go ahead and take St. George's day off!)  :)

    I've found what I think is a bug with how Sitefinity handles uploading a document with a duplicate name...though I haven't tested all cases and other versions of Sitefinity.  I'm using 3.7 SP3.

    If you upload a document to a library (let's say a PDF), and then later upload a second one (with the exact same name), you end up with two different copies in the library.  Because they both have the same name, you can only ever open one of them...whether it's the first or second one seems to vary. 

    When I run this in my dev environment SF initially creates a new document with the same name and "(1)" appended to it.  But you can change it, and the SF doesn't care about the duplicate file names (obviously because it's using a unique identifier).  And you can select either of the documents when you use a tool editor.  But when you create a dynamic URL based on the [provider]GUID, you'll get the same URL for both.  And only one of them will ever return.

    If you use the "Re-upload" button (after clicking Edit on the item), then all works as expected--you upload a new version of the same document.

    I think there should either be a duplicate file name check (and error message in the form field telling you it's a duplicate), or else upload and replace a previous version.  The second case is a bit more dangerous, though, as the user might not expect their upload will replace a document.  I'd favor the first case, preventing duplicate file names, since you can always use re-upload to update an existing document.

    This is not urgent for me, as I've instructed our users to use the Re-upload button from the Edit screen, and only upload new documents using the Upload button,  But in one case, I think the user was editing the name of the document, and didn't notice the duplication until afterward.

    Is there some configuration where "allow duplicates" can be turned on or off?

    Regards,
    Mike Sharp
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 May 2010
    Link to this post
    Hi Mike,

    This is an old bug that has not been fixed in 3.7 SP3. The problem is that when you upload the item we use the name as unique identifier, but the same does not apply when you edit the item. The problem could not be fixed with some configuration, it requires overriding the behavior of LibraryItemEdit view, but the case is quite complex, because when saving you need to loop through all items from a given library and check the names to find whether there is an item with the same name ( this results in the performance and saving could take some more time as usual). The problem has been logged and we will try to fix it for the next SP of 3.7 version.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Chris
    Chris avatar
    57 posts
    Registered:
    12 Nov 2008
    02 Feb 2011
    Link to this post
    So ... it's almost 8 months later. What's the status of this bug? It hasn't been fixed for SP4 as far as I can tell.

    Thanks,
    Chris
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Feb 2011
    Link to this post
    Hello Chris,

    The status of the bug is still not done. To fix the issue we have to rewrite the manager of the module and several other classes. I cannot give you a time frame for the fix.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered