I’ve read the topic Can't download or view pdf files - #12 by kalel and my problem is a bit different: after upgrading the system some of the files can be viewed/downloaded and most of them don’t.
I’ve checked file_dir, permissions, slashes, database and find nothing wrong.
The default PDFObject viewer is fairly obsolete, so this is probably why it is not displaying inline. Try enabling the “pdfJsViewer” instead from under the Generic plugins category.
I have a similar problem. No files can be viewed/downloaded. Nobody can download any of the PDFs or DOCs hosted at the journal system (and I know they’re there because they are all available in my university’s ftp - ftp://ftp.uff.br).
For these articles that are redirecting back to the journal index, take a look at the article metadata to see if there is some kind of inconsistency, or a visible difference from the metadata of the article that works. This could be something like a missing publication status.
If you’re good with code, you’re almost certainly failing the Article::validate() handler at line 452, with a redirect at line 530:
The table articles (new on v2.4.5) has a column named status. If status=3 the article is shown. If status=1 it is redirected back to the journal index. I don’t know why upgrade execution setted this value to 1 or 3. Is it safe to replace everything to 3?
This would indicate that in the earlier version or in the upgrade process there was a data error where some articles were being treated as published despite not technically having a published status. The article statuses can be found here:
You will want to be careful to check that articles which you expect to be published have both a published status in the articles table, and have an entry in the published_articles table. The best way to ensure this is by setting the status in the web interface, as an editor.
I choosed to update all the status on table articles to 3 (when they were equals to 1) where those articles exist on table published_articles.
After that I upgraded from version 2.4.5 to 3.0.0 and it’s working fine, too.
Thank you very much, Clinton.
Best regards,
Airton