Mets export plugin error 2.4.6+

Hello,

When upgrading to 2.4.6 Mets plugin didn’t display anything when clicking Export Issues. We have made changes into the mets plugin files and it seems to work (the problem seems to be this function: $site->getTitle($site->getPrimaryLocale()); so we simply change it.

Change 1: file: plugins\importexport\mets\MetsExportPlugin.inc.php

Line 81:
$organization = $site->getTitle($site->getPrimaryLocale());

was change to:
$organization = $journal->getSetting(‘publisherInstitution’);

Change 2:
File: plugins\importexport\mets\MetsExportDom.inc.php

Removed lines 661-663:
$siteDao =& DAORegistry::getDAO(‘SiteDAO’);
$site = $siteDao->getSite();
$organization = $site->getTitle($site->getPrimaryLocale());

And these are changed to:
$organization = ‘Here we put our institution name’;

Doing that, Mets plugin is exporting XML files, we haven’t proof if there is another problem,

Regards,

Hi @lcmartinezru,

Can you check your log file to see if there was an error message associated with that blank page? Usually a blank page means that a more specific error message was logged somewhere.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello @asmecher

The error message was: Fatal error: Call to undefined method Site::getTitle() in /home/infoeapm/public_html/ojs/ridac/demo19/plugins/importexport/mets/MetsExportPlugin.inc.php on line 81

This error is shown also on one installation of the latest version 2.4.7.

Regards

Hi @lcmartinezru,

Can you try applying one of the patches linked here?
https://github.com/pkp/pkp-lib/issues/891

All 3 are equivalent, just applied against different branches of the software. These should be applied from within the lib/pkp subdirectory.

Please confirm whether this fixes the problem.

Regards,
Alec Smecher
Public Knowledge Project Team