[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
http://berkalaarkeologi.kemdikbud.go.id/index.php/berkalaarkeologi/article/view/74/132

ex. PDF can be seen
http://berkalaarkeologi.kemdikbud.go.id/index.php/berkalaarkeologi/article/view/59/119

Anyone have problem like me?

OJS 2.4.8.1

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.

Best,
Bozana

Thanks for advice, now pdf can be seen.

Hello, @bozana

I’ve just upgraded from 2.4.7.1 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:

http://200.145.5.1/ojs/index.php/estgeo/article/view/12125/8084

Our OJS 2.4.7.1 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!

Oberdan

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?

Best,
Bozana

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.

Regards,

Oberdan