Markup plugin on OJS3.1.2

ojs3

#1

I’ve been trying to set up a fresh installation of OJS 3.1.2 with the OTS, ojs3-markup and Lens Galley plugins so that I can better incorporate JATS into our workflow.

I’m working with a test submission file and everything seems to go well until I the creation of production galleys. When I click on “Generate Galley Files,” the system responds with this error:

Failed Ajax request or invalid JSON returned.

I’m not sure if I’m correctly interpreting the PHP error log, but it looks as though there may be a problem with the markup plugin attempting to access a file by the wrong name:

[15-Mar-2019 04:09:54 UTC] PHP Warning: filemtime(): stat failed for lib/pkp/templates/plugins/generic/markup/templatestemplates/convert.tpl in /Users/XXX/Sites/XXX/lib/pkp/classes/template/PKPTemplateResource.inc.php on line 51

[15-Mar-2019 04:09:54 UTC] PHP Fatal error: Uncaught --> Smarty: Unable to load template ‘app:plugins/generic/markup/templatestemplates/convert.tpl’ <–
thrown in /Users/XXX/Sites/XXX/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195

@kaschioudi I assume that’s supposed to be …/markup/templates/convert.tpl… instead of …/markup/templatestemplates/convert.tpl, since there’s no ‘templatestemplates’ directory. Is there a way to resolve this?


#2

Hi @horne.b,

The markup plugin hasn’t been formally released, and we’re moving away from developing Open Typesetting Stack towards building for Grobid integration. (Grobid was a part of Open Typesetting Stack but has grown to include considerable overlap with OTS’s other features – and with a bigger development community to boot.)

I’d suggest watching for announcements on the PKP blog, and the appearance of a Grobid plugin in the Plugin Gallery, before attempting to use that code – unless you’re interested in tinkering with the code.

Regards,
Alec Smecher
Public Knowledge Project Team


#3

Hi Alec,

Thanks so much for your response, I really appreciate it and I’ve taken your suggestion of dispensing with the markup plugin in favor of waiting for Grobid.

Your advice turned out to be diagnostically helpful as well: When I removed the markup plugin I discovered that this error I encountered persisted and appeared when I tried to use other plugins. When I tried to check the settings of the embedGalley plugin the same “Failed Ajax request or invalid JSON returned” error appeared, and the PHP error log shows this:

[15-Mar-2019 17:56:32 UTC] PHP Fatal error: Uncaught --> Smarty: Unable to load template ‘app:plugins/generic/embedGalley/templatestemplates/settingsForm.tpl’ <–
thrown in /Users/XXX/Sites/XXX/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195

I’m tempted to just reinstall everything and try again, but I’d love to know what’s causing this odd “templatestemplates” hiccup and how to correct it myself if I ever see anything like it again.

Any advice would be really appreciated.
-bh


#4

Hi @horne.b,

I don’t think that’s related to the markup plugin – it appears to be related to the embedGalley plugin, which (at the moment) hasn’t been updated for OJS 3.1.2 yet.

Regards,
Alec Smecher
Public Knowledge Project Team


#5

Sorry for not being clearer on this, I should have stated this more explicitly: Now that I’ve deleted the markup plug-in I certainly agree that this error has nothing to do with the markup plug-in. But since this error about being unable to find a file in nonexistent (and clearly mistaken) ‘templatestemplates’ directories has now occurred for two separate, unrelated plug-ins, I’m wondering whether this is a more general problem.

I’m new to PHP and even newer to its error logs, but am I correct in interpreting these messages as both indicating that line 195 in smarty_internal_template.php has attempted and failed to access a tpl file in a non-exist “templatestemplates” directory – first in the case of markup and again later in the case of embedGalley?


#6

Hi @horne.b,

We had a change in conventions between OJS 3.1.1 and 3.1.2, so changes were necessary to all plugins that used templates to reflect this. (This was part of our shift in support from the Smarty library from version 2 to version 3.) Part of your upgrade process will mean upgrading plugins too – you can’t just run OJS 3.1.1 plugins with OJS 3.1.2.

Regards,
Alec Smecher
Public Knowledge Project Team


#7

Hi Alec,

That would certainly explain it! I think I had seen some of the plugins labeled in github with requirements like “OJS 3+” and assumed that the conventions were consistent across all 3.x.x versions. Next time I’ll try not to rush so quickly to false conclusions! :slight_smile:

Thanks again,
-Brian


#8

Hi @horne.b,

This is a place we could definitely improve clarity :slight_smile:

The best place to get plugins is via the Plugin Gallery inside OJS, but for plugins that aren’t there yet, it’s hard to know exactly what compatibility is like. We’ll be working to provide better templates and practices for that in the near future.

Thanks,
Alec Smecher
Public Knowledge Project Team