Pkp-lib: [OJS] Uploading supplementary file revisions fails in some circumstances

Created on 20 Apr 2018  路  7Comments  路  Source: pkp/pkp-lib

Hi @bozana and @asmecher

Here is a nasty little bug, enjoy :wink:

OJS 3.0.1 (probably also 3.1.1)

Scenario:
Author uploads revision files (probably applies to other uploading situations as well).

  • Upload file A as a new file, select article component "other"
  • Upload an almost similar file B and select "this is not a revision of an existing file" and article component "other"
  • Continue => OJS asks if this is the same file as file A you just uploaded, because it is so similar (possible duplication detected...)
  • Choose the option that the file _is_ the same => continue with upload
  • result: file A gets a new revision (there is a (2) behind the file name) but when you click it you get 500 error. This is because for some reason the second revision of the file is not uploaded at all.

This does not apply if you are uploading a "Article text" just the component "other" and possibly other supplementary files as well.

For a quick fix: I remember that there is a "file similarity" value in the config.inc.php file. What value would be needed there to stop OJS from comparing the files at all?

Bug

Most helpful comment

Sure, tomorrow, I am in the middle of Lego Ninjago the movie.

All 7 comments

Seems that giving it a value of 100 will end the comparison. @bozana can you confirm there are no side effects if I do that? I will fix this temporarily in our productions server with that solution while the actual issue is solved...

Phew... I am investigating... I think I found the bug... will come back soon...

PRs:
pkp-lib master: https://github.com/pkp/pkp-lib/pull/3625
ojs master: https://github.com/pkp/ojs/pull/1932 (only submodule update)

pkp-lib ojs-stable-3_1_1: https://github.com/pkp/pkp-lib/pull/3641
ojs ojs-stable-3_1_1: https://github.com/pkp/ojs/pull/1938 (only submodule update)

pkp-lib omp-stable-3_1_1: https://github.com/pkp/pkp-lib/pull/3643
omp omp-stable-3_1_1: https://github.com/pkp/omp/pull/527 (only submodule update)

@ajnyga, could you maybe test the pkp-lib patch?

Sure, tomorrow, I am in the middle of Lego Ninjago the movie.

Well that was a long movie, but the good guys won in the end!

It worked very well, thank you!

OK, then I will rebase, merge and cherry-pick... THANKS!!!

Was this page helpful?
0 / 5 - 0 ratings