FileApiHandler: File does not exist


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:
(note the missing ‘0’ in the filename):

If it helps this is the URL that gives the 500 error:

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?



Hi @jhennig

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?

Here is an example how it could look like:

<submission_file xmlns:xsi="" stage="review_attachment" id="31" xsi:schemaLocation=" native.xsd">
    <revision number="1" genre="Article Text" filename="filename.pdf" viewable="false" date_uploaded="2018-03-02" date_modified="2018-03-02" filesize="1953519" filetype="application/pdf" uploader="admin">



Thanks here is corresponding XML.

 <submission_file id="368">
     <revision number="1" filetype="application/pdf" filename="vol9no2pierce.pdf">
      <href src="...../slwPDF/vol9no2pierce.pdf" mime_type="application/pdf"/>
     <submission_file_ref id="368" revision="1"/>


Hi @jhennig

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:



Thanks I’ll give those attributes a try.