documents with identical names on same post cause trouble

Create issue
Issue #2759 open
Robert Jäschke created an issue

This post has two documents with the same name ("jaeschke2008discovering_oa.pdf") attached. This should never have happened (TODO: ensure that this never happens again). Unfortunately, now I can neither rename nor delete (one of) the posts(s).

Comments (7)

  1. Robert Jäschke reporter

    If that's an issue on the database level, a duplicate key constraint is probably missing (it might be that it's not feasible, since we use the table also for other things like the JabRef layouts where duplicate file names might be allowed?). If this can not be handled by a constraint (which would be preferable), checking for a duplicate name and storing the change needs to be done in a transaction.

  2. Thomas Niebler

    After the last bugfix release (3.7.4), it is now impossible to upload documents with identical filenames.

  3. Thomas Niebler

    Other than that, via

    select name, user_name, content_id, count(*) as cnt from document group by content_id, name having (cnt > 1) and (content_id > 0);

    we get 314 rows with uploaded documents, where quite a big fraction of documents are spam documents. At release time, we should delete the doubled rows.

  4. Log in to comment