Closed GrazingScientist closed 6 years ago
what ojs version do you use?
Sorry! It's OJS 3.1.1.2
ok, I guess something has changed in OJS.
I am planning to upgrade our own OJS installation to latest version during July and will check this plugin then as well while we have one journal using it. I will let you know when it is ready.
Thanks! You are awesome! 🥇
You could make sure that you have both DOM and libxml extensions installed in your server.
You should see "DOM/XML enabled" and "libxml active" in Administration => System Information => Extended PHP Information (bottom of page).
"DOM/XML" is "enabled". "libXML support" is "active". Does the version matter? "DOM/XML API Version" is version 20031129. libXML is version 2.9.1 .
ok thanks, I will get back to you once I do the upgrade (probably during next week)
I was digging further in this regard and now found that the solution to the given problem seems to be caused earlier in the code. However, since I have no idea of PHP, I hope for your help. My error log is this:
PHP Warning: XSLTProcessor::transformToDoc(): runtime error: file /testling/plugins/ge neric/embedGalley/xsl/jats-to-html.xsl line 999 element copy-of in /testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 207 [Tue Sep 25 11:34:08.273648 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Warning: XSLTProcessor::transformToDoc(): Cannot add an attribute node to a non-element node. in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 207 [Tue Sep 25 11:34:08.274111 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Warning: XSLTProcessor::transformToDoc(): runtime error: file testling/plugins/ge neric/embedGalley/xsl/jats-to-html.xsl line 999 element copy-of in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 207 [Tue Sep 25 11:34:08.274140 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Warning: XSLTProcessor::transformToDoc(): Attribute nodes must be added before any child nodes to an element. in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 207 [Tue Sep 25 11:34:08.274365 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Warning: XSLTProcessor::transformToDoc(): runtime error: file testling/plugins/generic/embedGalley/xsl/jats-to-html.xsl line 999 element copy-of in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 207 [Tue Sep 25 11:34:08.274385 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Warning: XSLTProcessor::transformToDoc(): Attribute nodes must be added before any child nodes to an element. in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 207 [Tue Sep 25 11:34:08.276973 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Warning: Creating default object from empty value in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 208 [Tue Sep 25 11:34:08.278488 2018] [:error] [pid 3502] [client 141.2.31.132:49468] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::saveHTML() in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php:210\nStack trace:\n#0 testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php(168): EmbedGalleyPlugin->_parseXml(Object(SubmissionFile))\n#1 testling/lib/pkp/classes/plugins/HookRegistry.inc.php(107): EmbedGalleyPlugin->embedHtml('Templates::Arti...', Array)\n#2 testling/lib/pkp/classes/template/PKPTemplateManager.inc.php(1145): HookRegistry::call('Templates::Arti...', Array)\n#3 testling/cache/t_compile/42362804174f266c598cdb32c3208fc745b92101^%%2D^2D7^2D7EC92F%%article.tpl.php(32): PKPTemplateManager->smartyCallHook(Array, Object(TemplateManager))\n#4 testling/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php(1257): include('...')\n#5 testling/lib/pkp/classes/template/PKPTemplateManager.inc in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 210
I excluded the parental directory in this log. I also tried a file given my asmecher, which causes this error: https://github.com/asmecher/texture/blob/master/texture/data/kitchen-sink/manuscript.xml
Can you help?
So it seems that at some point I did changes to the plugin which I did not upgrade here. I added the current version as a new release here: https://github.com/ajnyga/embedGalley/releases
We are using that exact same version in one of our journals and using OJS 3.1.1.2
Thanks! This removed the problem, but resulted in another one:
PHP Warning: DOMDocument::load(https://ojs.ub.uni-frankfurt.de/testling/plugins/generic/embedGalley/xsl/APA.xsl): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized\r\n in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 250, referer: https://ojs.ub.uni-frankfurt.de/testling/index.php/ltz/index [Tue Sep 25 13:28:44.770173 2018] [:error] [pid 22121] [client 141.2.31.132:52768] PHP Warning: DOMDocument::load(): Attempt to load network entity http://substance.io/TextureArticle-1.0.0.dtdValidation failed: no DTD found !I/O warning : failed to load external entity "https://ojs.ub.uni-frankfurt.de/testling/plugins/generic/embedGalley/xsl/APA.xsl" in testling/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 250, referer: https://ojs.ub.uni-frankfurt.de/testling/index.php/ltz/index
I checked the rights and all are read and writeable by the Apache...
I assume this is because my Apache server wants a login. I would say, a more generic solution would be to use the path of the directory of the plugin. Not?!
true!
Does it work with:
$path = Core::getBaseDir() . DIRECTORY_SEPARATOR . $this->getPluginPath() . DIRECTORY_SEPARATOR . 'xsl' . DIRECTORY_SEPARATOR . $citation_style . ".xsl";
here: https://github.com/ajnyga/embedGalley/blob/master/EmbedGalleyPlugin.inc.php#L247
Your code snippet removed the mentioned error. Yes! 👍
Shall I close this issue, because the mentioned error is resolved or may I post additional errors here?
Great, thanks for the feedback!
I will make that change to the code and do a new release.
I remember seeing the same error when I have done test upgrades of our production server, but never looked into this because the code of course worked on the production server without htaccess protection. Glad to have this sorted out, thanks :)
Go ahead and close this and start a new issue if needed. Just a heads up that during the winter I will see whether to start using this plugin or to use something based on the JatsParser plugin that is built for example into the OldGregg theme.
What I would like to see is a embed plugin that would show the article in the abstract page, but would still result into hits in the download counters. I have an idea how to accomplish this, but sure yet if it is actually possible.
I am looking forward to any new release! :)
Hi there!
I just uploaded this xml file:
When uploading only this (not the image file), my article page loses its sidebar... How can I included images without giving a link to the file but uploading it directly in the backend?
Edit: When the sidebar gets lost, the log tells me: "Uncaught Error: Call to undefined method stdClass::saveHTML()". Perhaps this helps....