Hi,
We recently loaded submissions via the xml import. We noticed that PDF’s can not be downloaded. An error of:
FileApiHandler: File …journals/10//articles/6745//6745–2366-1-0-20180613.pdf does not exist or is not readable!
The real physical file path is actually:
…/journals/10/articles/6745/6745–2366-1–20180613.pdf
(note the missing ‘0’ in the filename):
If it helps this is the URL that gives the 500 error:
./$$$call$$$/api/file/file-api/download-file?fileId=2366&revision=1&submissionId=6745&stageId=5
I built the xml file myself so could I have screwed something up in the file?
Can this be fixed by changing some values in the database?
Hmm… The file names are constructed like this: submissionId-genreId-fileId-revision-fileStage-timestamp.extension.
Thus, it seems your file names are missing something, maybe genreId and fileStage.
Depending on how many files did you imported you could eventually repair them manually, but it is not easy: you would need to enter the correct values in the DB, rename the physical files and move them to the correct subfolder.
Could you post the XML elements submission_file and revision from the XML import, from the example file above?
If those are galley files, you would need to use stage="proof" as attribute in the submission_file element. Those are probably article full texts, correct? Then you would probably need to use genre="Article Text" (if you are using en_US locale) as attribute in the revision element. Available genre names you will find in your DB table genre_settings, for that specific journal.
For further possible stage values see this function: pkp-lib/PKPNativeImportExportDeployment.inc.php at omp-3_1_1-2 · pkp/pkp-lib · GitHub.