HTML Galleys don't display properly

Hi. I have uploaded an HTML file and the Label field says “untitled”. It looks like the file has not been identified as HTML, correctly. The “File type” field shows “text/x-asm”, not “text/html”. It doesn’t seem to be a problem of mimetype or html code. As a matter of fact, I have uploaded tons of html files before without problems. I believe the problem began when I upgraded OJS from 2.3.2 to 2.4.3.0. Does somebody have a clue about what is happening. Thank You.

Hi @nanaluna,

OJS is having a hard time identifying what MIME type your HTML articles are, as you’ve noted. What is the mime_database_path set to in config.inc.php? (Is it commented out entirely?)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher. Thanks for reply. This is what mime_database_path code line looks like:

mime_database_path = /etc/magic.mime

This is the URL www.revistamedicina.net. I don´t know if it´s useful

Hi @nanaluna,

Does that file actually exist? If not, please comment out that line of configuration with a semicolon. Then create and upload a new HTML galley to see if the file type is detected properly after the configuration change.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher . I did exactly what you asked me to do. How I couldn´t find that file I comment out that line with a semicolon. I uploaded a new html file but nothing change. Still shows label: “untitled” and file type “text/x-asm” and nothing about of HTML Galley Files to charge images.

Hi @nanaluna,

I’d suggest working through this FAQ entry called “HTML Galleys don’t display properly / files I upload aren’t being identified properly.”

http://pkp.sfu.ca/wiki/index.php/PKP_Frequently_Asked_Questions

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you asmecher. Finally i found the origin of the problem. It was the PHP version. I changed the PHP version from 5.3 to 5.4 some weeks ago, and apparently that made some class of incompatibility with HTML galley identification. I don´t know why, but it happened, so I returned to 5.3 and it fix the problem. Thank you for your help and support. Good day

Hey @asmecher – our journal’s first issue went live today! Yay! Toast! Then we had a strange HTML glitch that I’m seeking to troubleshoot. One of the articles inexplicably is running into the “Refbacks” and footer, but none of the others do. I tried deleting the galley and reuploading with no avail. I’ll try resaving the whole thing in Kompozer and reuploading it, but thought I’d reach out here to see if anyone else has had this wonky thing happen – and advice on how to fix it??? Thanks!! WIll be happy to share how i resolve it, too.

I fixed it by reuploading a brand new html recreated by coping and pasting the other piece. I don’t know what got wonky, but at least it is all on one page.

Just ran into a similar problem; HTML created using Export from MS Word resulted in file returning text/x-c++ rather than text/html. Trying Tidy to clean it up.

It would be really nice if there were a way to manually override MIME types in cases like this; it could be a security problem, though…

@crism, see the @ambiguities array in the String class’s mime_content_type() method. Maybe one day I’ll work it into the UI.

lib/pkp/classes/core/String.inc.php

Thanks, @ctgraham. Tidy did help a file pass as text/html, but OJS 3 still insists on downloading it rather than just displaying it. I must be overlooking something…

I haven’t spent time in OJS 3 myself. Someone else might be better to weigh in here.

Hi @crism,

It’s likely that the HTML viewable file plugin (plugins/viewableFiles/htmlArticleGalley/) isn’t currently working in the OJS 3.0 codebase; I haven’t worked with that within the last couple of months, off the top of my head.

Regards,
Alec Smecher
Public Knowledge Project Team