HTML galley us not rendered but downloaded

Hi,

I have OJS 3.1.2-1 with HTML Article Galley plugin enabled and a valid HTML file as a galley for a published article. The server is running on a Windows.

The problem that the HTML galley is not rendered when clicking on it but rather downloaded. Can you please help me to solve the problem?

Regards, Primož

Hi @primozs,

It seems that HTML Galley Plugin fails to render you galley files for some reason. Do you have access to the database? If so, can you check in the submission_files table the file_type for the galley that fails to be rendered? E.g., for submission with id 127: SELECT * FROM submission_files WHERE submission_id=127. For the HTML file, you should see something like:

969	1			127	text/html	1	44253	galley.html	10			0	2019-04-17 16:35:21	2019-04-17 16:35:21	1	521	274	

File type, in this case, is and should be text/html.
Also, when you hitting the button to view galley page, but HTML is just been downloaded, do you see any relevant errors in the PHP logs?

1 Like

Hi @Vitaliy,

Thanks for help. The problem was with wrong file_type in the DB. It was text/plain. After changing it works.
I have checked the mime.types file and there is the entry

text/html html htm

in it. So I guess that is OK.

Now the question is why that came into the DB. Any idea what could be the root cause?

Best regards, Primož

Hi all,

There’s information on how OJS detects MIME types here:

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @Vitaliy and @asmecher,

Thank you very much for your help, solved everything.

Best regards, Primož

1 Like