Hi @Vitaliy
I tried to deactivate and remove the JATS Parser plugin form the plugin’s folder.
This crashes the article view page (/index.php/aoi/article/view/1) with an apache error 500.
Readingf the apahce erro log I see:
PHP Fatal error: Uncaught Error: Class 'JATSParser\\Body\\Document' not found in /var/www/vhosts/actaitalica-ojs3.archicoop.it/plugins/themes/oldGregg/OldGreggThemePlugin.inc.php:185\nStack trace:\n#0 /var/www/vhosts/actaitalica-ojs3.archicoop.it/lib/pkp/classes/plugins/HookRegistry.inc.php(107): OldGreggThemePlugin->jatsParser('TemplateManager...', Array)\n#1 /var/www/vhosts/actaitalica-ojs3.archicoop.it/lib/pkp/classes/template/PKPTemplateManager.inc.php(856): HookRegistry::call('TemplateManager...', Array)\n#2 /var/www/vhosts/actaitalica-ojs3.archicoop.it/pages/article/ArticleHandler.inc.php(197): PKPTemplateManager->display('frontend/pages/...')\n#3 /var/www/vhosts/actaitalica-ojs3.archicoop.it/lib/pkp/classes/core/PKPRouter.inc.php(372): ArticleHandler->view(Array, Object(Request))\n#4 /var/www/vhosts/actaitalica-ojs3.archicoop.it/lib/pkp/classes/core/PKPPageRouter.inc.php(233): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#5 /var/www/vhosts/actaitalica-ojs3.archicoop.it/lib/pkp/classes/cor in /var/www/vhosts/actaitalica-ojs3.archicoop.it/plugins/themes/oldGregg/OldGreggThemePlugin.inc.php on line 185, referer: http://actaitalica-ojs3.archicoop.it/index.php/aoi/issue/view/2
If I put back the JATS Parser plugin the error disappear.
Morover, looking at the OldGregg Readmy file on gitHub
(GitHub - Vitaliy-1/oldGregg: Theme for OJS 3 with Bootstrap 4)
I see the following:
This is a custom theme for the latest OJS 3 release. It is based on Bootstrap 4 framework and uses JATS Parser Plugin for automatic rendering of articles in JATS XML format and displaying them on article landing page.
where I understand that the JATS Parser plugin is required. Is there something that I’m not understanding?
Thanks so much
--------- UPDATES TO THIS POST ------------------
After some investigations, I found out that the php error described above can be fixed by commenting out the following lines in the OldGregThemePlugin.inc.php (located at rows 17-20 in the root of the OldGregg theme plugin)
// $pluginSettingsDAO = DAORegistry::getDAO('PluginSettingsDAO');
// $context = PKPApplication::getRequest()->getContext();
// $contextId = $context ? $context->getId() : 0;
// $jatsParserSettings = $pluginSettingsDAO->getPluginSettings($contextId, 'JatsParserPlugin');
if (!class_exists('\JATSParser\Body\Document', true) && empty($jatsParserSettings)) {
require_once __DIR__ . '/jatsParser/src/start.php';
}
If I’m not wrong, the if tha contain the require_once is not executed because empty($jatsParserSettings) is false even if the JATSParser plugin is not active and the plugin code not present in the plugin’s directory.
And this happens because the plugin’s settings are not removed from the the DB after the plugin is disabled.
So, once the JATSParser Plugin has been installed in a the OJS instance, the oldGregg theme detect the plugin installed, no matter if it has been disabled and removed.
Maybe a different test is needed here for checking the plugin’s installation?