ajnyga / embedGalley

OJS3 plugin for visualizing JATS XML galleys
GNU General Public License v3.0
8 stars 3 forks source link

Not working with OJS 3.1.2-2 #6

Closed marcbria closed 3 years ago

marcbria commented 5 years ago

Hi @ajnyga

I was testing your module (your release tagged as 1.0.0.2) against last OJS last stable (3.1.2-2) and when clicking in "settings" I got this error:

Failed Ajax request or invalid JSON returned.

On log I can read the following:

[Tue Sep 17 00:13:11.776847 2019] [php7:warn] [pid 652] [client 93.176.187.155:57510] PHP Warning:  Declaration of EmbedGalleySettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/html/plugins/generic/embedGalley/EmbedGalleySettingsForm.inc.php on line 76, referer: http://myjournal.uab.cat:8082/athenea/management/settings/website
[Tue Sep 17 00:13:11.777242 2019] [php7:warn] [pid 652] [client 93.176.187.155:57510] PHP Warning:  filemtime(): stat failed for lib/pkp/templates/plugins/generic/embedGalley/templatessettingsForm.tpl in /var/www/html/lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51, referer: http://myjournal.uab.cat:8082/athenea/management/settings/website
[Tue Sep 17 00:13:11.777493 2019] [php7:error] [pid 652] [client 93.176.187.155:57510] PHP Fatal error:  Uncaught  --> Smarty: Unable to load template 'app:plugins/generic/embedGalley/templatessettingsForm.tpl' <-- \n  thrown in /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195, referer: http://myjournal.uab.cat:8082/athenea/management/settings/website

Please, let me know if you need more info.

Thanks for your work, m.

GrazingScientist commented 4 years ago

I back this issue! I am using OJS 3.1.2-4 and got the same issue.

GrazingScientist commented 4 years ago

I get also this error:

Uncaught Error: Call to undefined method stdClass::saveHTML() in /srv/www/htdocs/journals/testling-311
4/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php:169\nStack trace:\n#0 /srv/www/htdocs/journals/testling-3114/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php(143): EmbedGalleyPlugin->_parseXml(Ob
ject(SubmissionFile))\n#1 /srv/www/htdocs/journals/testling-3114/lib/pkp/classes/plugins/HookRegistry.inc.php(107): EmbedGalleyPlugin->embedHtml('Templates::Arti...', Array)\n#2 /srv/www/htdocs/journals/testl
ing-3114/lib/pkp/classes/template/PKPTemplateManager.inc.php(1116): HookRegistry::call('Templates::Arti...', Array)\n#3 /srv/www/htdocs/journals/testling-3114/cache/t_compile/7eace633da4006bf045fb0bd05e6ec4df
e5da1df^1c372c95cd85572e0fbc9a53d0323a0b229cfc78_0.app.frontendpagesarticle.tpl.php(43): PKPTemplateManager->smartyCallHook(Array, Object(Smarty_Internal_Template))\n#4 /srv/www/htdocs/journals/testling-3114/
lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content in /srv/www/htdocs/journals/testling-3114/plugins/generic/embedGalley/EmbedGalleyPlugin.inc.php on line 169
GrazingScientist commented 4 years ago

This may be related to #2 ?

GrazingScientist commented 4 years ago

Okay! With my master detective skills, I could unravel the mystery of the lost saveHTML function. As I proposed, in #2 was the solution. My test journal is behind a apache login protection. Hence, the call of the ULR for the stylesheet did not work and so did not all the rest.

I created #7 to make this issue more prominent.

diegomejia071 commented 3 years ago

Hi,

I have this error in my OJS 3.1.2.0

PHP Warning: Declaration of EmbedGalleySettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /plugins/generic/embedGalley/EmbedGalleySettingsForm.inc.php on line 0, referer: /management/settings/website?uid=5fbfc76c751fd PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/embedGalley/templatessettingsForm.tpl in /lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51, referer: /management/settings/website?uid=5fbfc76c751fd PHP Fatal error: Uncaught --> Smarty: Unable to load template app:plugins/generic/embedGalley/templatessettingsForm.tpl <-- \n thrown in /lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195, referer: /management/settings/website?uid=5fbfc76c751fd

GrazingScientist commented 3 years ago

Hi,

I have this error in my OJS 3.1.2.0

PHP Warning: Declaration of EmbedGalleySettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /plugins/generic/embedGalley/EmbedGalleySettingsForm.inc.php on line 0, referer: /management/settings/website?uid=5fbfc76c751fd PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/embedGalley/templatessettingsForm.tpl in /lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51, referer: /management/settings/website?uid=5fbfc76c751fd PHP Fatal error: Uncaught --> Smarty: Unable to load template app:plugins/generic/embedGalley/templatessettingsForm.tpl <-- \n thrown in /lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195, referer: /management/settings/website?uid=5fbfc76c751fd

Did you pull the master branch or the 3.1.2 release?

diegomejia071 commented 3 years ago

Hi @GrazingScientist

Take out the version 3.1.2 branch

image

GrazingScientist commented 3 years ago

This error sounds really strange to me. Did you try to clear the OJS caches?

diegomejia071 commented 3 years ago

Hi @GrazingScientist,

Yes, I already did that and I keep getting the same error.

image

PHP Warning: Declaration of EmbedGalleySettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /plugins/generic/embedGalley/EmbedGalleySettingsForm.inc.php on line 0, referer: /management/settings/website?uid=5fbfc76c751fd PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/embedGalley/templatessettingsForm.tpl in /lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51, referer: /management/settings/website?uid=5fbfc76c751fd PHP Fatal error: Uncaught --> Smarty: Unable to load template app:plugins/generic/embedGalley/templatessettingsForm.tpl <-- \n thrown in /lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195, referer: /management/settings/website?uid=5fbfc76c751fd

ajnyga commented 3 years ago

Hi, so the settings form was actually not used. I was planing at one point to allow users to switch the citation format used by the plugin, but have not had the time to do that. I removed the unfinished settings form from the 3.2 release.