PDF error: Stream must have data

ojs
#1

We noticed that when you try to open a PDF from volume 36 on back on our site, http://journal.viterbo.edu/index.php/atpp you receive this error.

If you click download, it downloads a “download.html” file that is zero bytes. The two volumes we have after 36 work for some reason. We also have another journal, http://journal.viterbo.edu/index.php/at/issue/archive I did a spot check on this one, and the PDFs open fine.

#2

Hi @jaskoog

Could you please check you dir_files and permissions reading in your filesystem?
Sometimes not only chmod but chown command is required to set correct permissions.

Regards,
Israel Cefrin
Public Knowledge Project Team

#3

The permissions on the folders were off. The data group didn’t have permission initially. So we did change them. We restarted the server, but we still have the problem.

For the issues that are working, the folder structure in the ojsfiles folder is: …/articles/##/submission/##.pdf

For the older issues that aren’t working, the folder structure in the ojsfiles folder looks to be nested one folder deeper:
…/articles/##/submission/proof/##.pdf or …/articles/##/submission/copyedit/##.pdf

How do we know where OJS is looking for the pdf files to be? Do we need to change the location of the older pdf files so the system will see them?

Thanks

#4

Please check did you write correctly path in config.inc.php

#5

The paths in the config file are good. Thanks.

#6

Which permissions you have on folder with pdf files.
The message that you receive is related to inability of system to access pdf files. In majority of cases that is due to too restrictive permissions or location that is not accessible to OJS.

#7

Our IT said the permissions looked good. I noticed that when I click on “Edit” for one of these issues with problems, the table contents fails to load (It spins). I was attempting to try replacing the PDF for each article. I can access the Issue Data, Issue Galley, and Identifier tabs fine.

The table of contents loads fine for volume 37 and 38, which appear just fine on the website. They also load fine for our Analytic Teaching, our first journal (which is different than the one I’m having problems in – Analytic Teaching and Philosophical Praxis).

#8

I also receive this error when I log into the dash board of the journal with problem, Analytic Teaching and Philosophical Praxis. I hit OK and the error appears, then hit OK again and it goes away.

I do not receive this error when logging into our other journal, Analytic Teaching.

#9

Is that journal Analytic Teaching localted on the same server?

#10

Yes, both journals are on the same server.

#11

Are they in they in the same installation of OJS?

#12

Yes, both are in the same installation.

#13

Let me try to summarize: You have two distinctjournals in teh sdame installation of OJSand one loads TOC propely while other one does not load it properly.

It should not be technical issue. I guess it is rather due to some small mistake in journal settings.
Do you have in other journal that does not load TOC properly editor with access to all stages of workflow?

#14

I decided to delete the old issues and re-upload them. But after doing so, I get the same error when I try to click on the PDF.

Edit: I was able to upload with the quick submit plugin, and it worked. However, if I try it without the quick submit plugin it doesn’t. Since at this time we are fine with using the quick submit plugin, our PDFs should open.

#15

Hi @jaskoog

Check your php error log and webserver error log. These files must show you some error message regarded to this issue.

Regards,
Israel Cefrin
Public Knowledge Project Team

#16

We recently had the same problem during bulk import, one thing you might want to check is the filename attribute in the <submission file> element in your XML - it is limited to 127 characters (including the file extension), but there’s no check on native XML import whether it meets the criteria. If it gets truncated, you get the “Stream must have data”-error.

1 Like