[SOLVED] PDF Article Can't be seen, but can be directly downloaded

I had a problem with the article on the web OJS, the PDF article can not be seen but can be directly downloaded.
ex. link PDF can’t be seen, but can be directly downloaded

ex. PDF can be seen

Anyone have problem like me?


Hi @andrewdion04

Can you take a look in your DB: go to the table article_galleys and find the entry with galley_id = 132. Then see the file_id in that entry – I think it should be 202. Then go to the table article_files and then go to that file with the ID = 202, and see how the file_type is looking? – I believe the file type is not correct (e.g. application/pdf). If so check this one on MIME type detection more generally.


Thanks for advice, now pdf can be seen.

Hello, @bozana

I’ve just upgraded from to 3.0.2, and I’m having a similar problem. Every time I click on a PDF or full text link it downloads the file instead of showing the content. Tried to check the article_galleys table but it no longer exists. This can be seen here:

Our OJS is running on the same server using the same php, Our configuration is:

Ubuntu 16.04.1 LTS
PHP 5.6.27-1+deb.sury.org~xenial+1
mysql Ver 14.14 Distrib 5.7.16

I’ve already searched the forums with no success. So I think it’s a bug os something really small and and simple that I’m missing…

Any help is appreciated. Thanks!


Hi @Oberdan

Hmmm… The mime type seems to be correct. The table is now called submission_galleys. Could you then double check the file_type there?
Also, is the pdfViewer generic plugin (Settings > Website > Plugins) enabled in your installation?


Hello @bozana,

It seems that something went wrong with the upgrade after all. Apache error log is showingo this:

PHP Warning:  Illegal string offset 'pt_BR' in /ojs_temp/rc-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133

And the changes made to the configuration are not saved. I’ll correct this first and see what happens next.