Hello, I have a problem, I try to preview the HTML as galley but the iframe does not take it, I practically leave it blank and it does not show me anything of the HTML file, is there any solution?
in the table submission_file text / html appears.
I am managing the version of ojs 3.1.1.4 thank your collaboration
this is my HTML content
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Test Document</title>
</head>
<body>
<h1 class="center">Hello I am Test Document</h1>
<br>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Error repellat facilis necessitatibus, accusantium culpa aspernatur ut dolorem dolore provident perspiciatis, esse quos voluptas iste quo ipsam ipsum ducimus. Labore, est?</p>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Error repellat facilis necessitatibus, accusantium culpa aspernatur ut dolorem dolore provident perspiciatis, esse quos voluptas iste quo ipsam ipsum ducimus. Labore, est?</p>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Error repellat facilis necessitatibus, accusantium culpa aspernatur ut dolorem dolore provident perspiciatis, esse quos voluptas iste quo ipsam ipsum ducimus. Labore, est?</p>
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Error repellat facilis necessitatibus, accusantium culpa aspernatur ut dolorem dolore provident perspiciatis, esse quos voluptas iste quo ipsam ipsum ducimus. Labore, est?</p>
</body>
</html>
Hi @jhfredy,
Check your PHP error log for details. (See How do I find my PHP error log? if you’re not sure where to look.)
Regards,
Alec Smecher
Public Knowledge Project Team
HI @asmecher
The only error that appears to me in the PHP console is
PHP Warning: Cannot use a scalar value as an array in ../lib/pkp/classes/core/DataObject.inc.php on line 133
Thanks
Here is the domain where the error is located
https://revistas.unilibre.edu.co/index.php/lux_praxis/article/view/5193/4404
Hi @jhfredy,
That warning shouldn’t be causing any problems – if you don’t see anything else relevant in your error log, the other likely cause is your files directory. Did you change this (files_dir
in config.inc.php
) or move your installation around after uploading the HTML? If so, OJS is probably having trouble finding or accessing the file.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
I have not moved the configuration of the config.inc.php directory
In addition, if you realize within our journal portal all the files with the PDF extension work correctly
https://revistas.unilibre.edu.co/index.php/lux_praxis/index
but the but the only one that does not work is with the HTML file system
I appreciate your collaboration
Hi @jhfredy,
Hmm, I would expect something to show up in the error log in this case. Maybe double-check to see if there is anything else in the log that’s relevant?
Are you able to download the file from within the editorial workflow, by clicking on its entry in the Galleys list?
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
I found another errors when I uploaded another html File in php console errors log
PHP Warning: include(/data2/libre3114/cache/fc-pluginSettings-38-recommendbyauthorplugin.php): failed to open stream: No existe el archivo o el directorio in /data2/libre3114/lib/pkp/classes/cache/FileCache.inc.php on line 46, referer: https://revistas.unilibre.edu.co/index.php/lux_praxis/manageIssues
PHP Warning: include(): Failed opening '/data2/libre3114/cache/fc-pluginSettings-38-recommendbyauthorplugin.php' for inclusion (include_path='.:/data2/libre3114/classes:/data2/libre3114/pages:/data2/libre3114/lib/pkp:/data2/libre3114/lib/pkp/classes:/data2/libre3114/lib/pkp/pages:/data2/libre3114/lib/pkp/lib/adodb:/data2/libre3114/lib/pkp/lib/phputf8:/data2/libre3114/lib/pkp/lib/pqp/classes:/data2/libre3114/lib/pkp/lib/smarty:.:/usr/share/php') in /data2/libre3114/lib/pkp/classes/cache/FileCache.inc.php on line 46, referer: https://revistas.unilibre.edu.co/index.php/lux_praxis/manageIssues
PHP Warning: include(/data2/libre3114/cache/fc-pluginSettings-38-webfeedblockplugin.php): failed to open stream: No existe el archivo o el directorio in /data2/libre3114/lib/pkp/classes/cache/FileCache.inc.php on line 46, referer: https://revistas.unilibre.edu.co/index.php/lux_praxis/manageIssues
PHP Warning: include(): Failed opening '/data2/libre3114/cache/fc-pluginSettings-38-webfeedblockplugin.php' for inclusion (include_path='.:/data2/libre3114/classes:/data2/libre3114/pages:/data2/libre3114/lib/pkp:/data2/libre3114/lib/pkp/classes:/data2/libre3114/lib/pkp/pages:/data2/libre3114/lib/pkp/lib/adodb:/data2/libre3114/lib/pkp/lib/phputf8:/data2/libre3114/lib/pkp/lib/pqp/classes:/data2/libre3114/lib/pkp/lib/smarty:.:/usr/share/php') in /data2/libre3114/lib/pkp/classes/cache/FileCache.inc.php on line 46, referer: https://revistas.unilibre.edu.co/index.php/lux_praxis/manageIssues
PHP Warning: Cannot use a scalar value as an array in /data2/libre3114/lib/pkp/classes/core/DataObject.inc.php on line 133, referer: https://revistas.unilibre.edu.co/index.php/lux_praxis/manageIssues
When I Active the Debug error from Config.inc.php I can Download the html File
Thanks
Hi @jhfredy,
When you say you can download the file, do you mean via the editorial interface, or via the public view of the journal? Can you only download it when the debug
option is turned on in config.inc.php
?
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
I can download the html file in the public view but only when PHP debugging is active in the configuration.inc.php or when I change in the “submit_files” table in the “file_type” column
text/html by application/html
when I disable the PHP debugger the public view opens with the iframe
Thanks
Hi @jhfredy,
The file_type
should be text/html
, or else OJS will treat the file like something to download (e.g. to your client computer’s Downloads directory) rather than an HTML document.
The debug
option in config.inc.php
should be turned off; you’ll likely just get a bunch of PHP warnings etc. if you turn that on, and they interfere with AJAX requests etc.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
Thank you very much for the information provided.
Would there be another way to open a viewer within OJS to render galley articles in HTML as a plugin?
Hi @jhfredy,
If you have everything set up per my above post, and still get blank pages, then 99% of the time it’ll be a PHP fatal error. Those should definitely be logged/recorded somewhere, so you may need to explore to find out where that is. You might need to look higher up in your log file, in case there are lots of cosmetic warnings hiding an actual error in their midst.
The problem seems to be in the HTML article galley plugin (plugins/generic/htmlArticleGalley
), off the top of my head. This is the only plugin I’m aware of for presenting HTML articles. If there’s anything unusual about your codebase there, i.e. it’s been modified from the version that came with 3.1.1-4, you might want to revert those changes.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher
I test a HTML file inside an OJS portal with version 3.1.1.2 and it works correctly
https://revistas.unbosque.edu.co/CHP/article/view/2545/2055
with the other journals that is handled in OJS 3.1.1.4 does not work
Thanks
Hi @jhfredy,
Nothing relevant changed between OJS 3.1.1-2 and 3.1.1-4 that I recall or can find in a quick look at that code; I suspect it’s something specific to your installation.
Regards,
Alec Smecher
Public Knowledge Project Team
Could you please clear cache and hope any already HTML viewer plug in installed default in 3x version. If you face same issue again could you please share screen shot.