Sword protocol errors due to export to SHERPA/ROMEO

i have registerd at SHERPA/ROMEO v2. receive API. create custom point in sword deposit settings, but i have receive a lot of errors due to export

[proxy_fcgi:error][55424] : Got error 'PHP message: PHP Warning:  Declaration of SwordSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website?r=5eb90e1935ccf
[proxy_fcgi:error][55480] : Got error 'PHP message: PHP Warning:  Declaration of SwordSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website?r=5eb90e339290e
[proxy_fcgi:error][55526] : Got error 'PHP message: PHP Warning:  Declaration of SwordSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website?r=5eb90e4dc52fc
[proxy_fcgi:error][55592] : Got error 'PHP message: PHP Warning:  Declaration of SwordSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website?r=5eb90e4dc52fc
[proxy_fcgi:error][55662] : Got error 'PHP message: PHP Notice:  Undefined variable: depositedIds in /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php on line 139', referer: https://uars.info/index.php/uars/management/tools
[proxy_fcgi:error][55726] : Got error 'PHP message: PHP Warning:  Declaration of SwordSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website
[proxy_fcgi:error][55736] : Got error 'PHP message: PHP Warning:  Declaration of SwordDepositPointForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::readInputData($request) should be compatible with Form::readInputData() in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website
[proxy_fcgi:error][55770] : Got error 'PHP message: PHP Warning:  Declaration of SwordDepositPointForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::readInputData($request) should be compatible with Form::readInputData() in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website
[proxy_fcgi:error][55796] : Got error 'PHP message: PHP Notice:  Undefined variable: depositedIds in /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php on line 139', referer: https://uars.info/index.php/uars/management/tools
[proxy_fcgi:error][55812] : Got error 'PHP message: PHP Notice:  Undefined variable: depositedIds in /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php on line 139', referer: https://uars.info/index.php/uars/management/tools
[proxy_fcgi:error][55882] : Got error 'PHP message: PHP Warning:  Declaration of SwordSettingsForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordSettingsForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/SwordSettingsForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website
[proxy_fcgi:error][55894] : Got error 'PHP message: PHP Warning:  Declaration of SwordDepositPointForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::readInputData($request) should be compatible with Form::readInputData() in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website
[proxy_fcgi:error][55900] : Got error 'PHP message: PHP Warning:  Declaration of SwordDepositPointForm::fetch($request) should be compatible with Form::fetch($request, $template = NULL, $display = false) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::readInputData($request) should be compatible with Form::readInputData() in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16PHP message: PHP Warning:  Declaration of SwordDepositPointForm::execute() should be compatible with Form::execute(...$functionArgs) in /var/www/uars/plugins/generic/sword/controllers/grid/form/SwordDepositPointForm.inc.php on line 16', referer: https://uars.info/index.php/uars/management/settings/website
[proxy_fcgi:error][55926] : Got error 'PHP message: PHP Notice:  Undefined variable: depositedIds in /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php on line 139', referer: https://uars.info/index.php/uars/management/tools
[proxy_fcgi:error][56108] : Got error 'PHP message: PHP Fatal error:  Uncaught Error: Class 'Locale' not found in /var/www/uars/plugins/generic/sword/classes/PKPSwordDeposit.inc.php:90\nStack trace:\n#0 /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php(197): PKPSwordDeposit->setMetadata(Object(Request))\n#1 /var/www/uars/lib/pkp/pages/management/PKPToolsHandler.inc.php(104): SwordImportExportPlugin->display(Array, Object(Request))\n#2 /var/www/uars/lib/pkp/classes/core/PKPRouter.inc.php(391): PKPToolsHandler->importexport(Array, Object(Request))\n#3 /var/www/uars/lib/pkp/classes/core/PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#4 /var/www/uars/lib/pkp/classes/core/Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request))\n#5 /var/www/uars/lib/pkp/classes/core/PKPApplication.inc.php(278): Dispatcher->dispatch(Object(Request))\n#6 /var/www/uars/index.php(68): PKPApplication->execute()\n#7 {main}\n  thrown in /var/www/uars/plugins/generic/sword/classes/PKPSw...', referer: https://uars.info/index.php/uars/management/importexport/plugin/SwordImportExportPlugin

version of sword plugin: 1.0.2.1
%D0%91%D0%B5%D0%B7%20%D1%96%D0%BC%D0%B5%D0%BD%D1%96

Current version: 3.2.0.3 (May 10, 2020 - 05:47 PM)

Server Information

Setting Name Setting Value
OS platform Linux
PHP version 7.3.11-0ubuntu0.19.10.4
Apache version Apache/2.4.41 (Ubuntu)
Database driver mysqli
Database server version 10.3.22-MariaDB-0ubuntu0.19.10.1

Hi. posted a pull request to address the fatal error you posted. It is here, and you can probably just manually change your copy of the plugin if you don’t want to wait for a new release:

There are just two lines changed.

I looked at the Sherpa Romeo site and didn’t see anything concerning a SWORD api. Is there a way anyone can test with their API?

@brianh, if i understand correct, i need to change “classes/PKPSwordDeposit.inc.php” with code posted here: remove deprecated Locale call and get locale from publication instead by quoideneuf · Pull Request #22 · pkp/sword · GitHub

and 2-nd question. if i want to send only english metadata, i need to insert upper
smth like “$locale = ‘en_US’”

Got error ‘PHP message: PHP Notice: Undefined variable: depositedIds in /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php on line 139’,
referer: https://uars.info/index.php/uars/management/tools
[Wed May 13 00:01:26.240900 2020] [proxy_fcgi:error] [pid 20167:tid 139903769724672] [client 192.168.2.20:37152] AH01071:
Got error ‘PHP message: PHP Fatal error: Uncaught Error: Class ‘ZipArchive’ not found in /var/www/uars/plugins/generic/sword/libs/swordappv2/packager_mets_swap.php:197
\nStack trace:\n#0 /var/www/uars/plugins/generic/sword/classes/PKPSwordDeposit.inc.php(155):
PackagerMetsSwap->create()\n#1 /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php(200):
PKPSwordDeposit->createPackage()\n#2 /var/www/uars/lib/pkp/pages/management/PKPToolsHandler.inc.php(104):
SwordImportExportPlugin->display(Array, Object(Request))\n#3 /var/www/uars/lib/pkp/classes/core/PKPRouter.inc.php(391):
PKPToolsHandler->importexport(Array, Object(Request))\n#4 /var/www/uars/lib/pkp/classes/core/PKPPageRouter.inc.php(231):
PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#5 /var/www/uars/lib/pkp/classes/core/Dispatcher.inc.php(143):
PKPPageRouter->route(Object(Request))\n#6 /var/www/uars/lib/pkp/classes/core/PKPApplication.inc.php(278):
Dispatcher->dispatch(Object(Request))\n#7 /var/www/uars/index.php…’,
referer: https://uars.info/index.php/uars/management/importexport/plugin/SwordImportExportPlugin

i install php7.3-zip extension, and after that receive message:

Deposit Failed

Development of the Greek-Catholic Church in Independent Ukraine: Historical Heritage and New Trends

Error parsing error document (String could not be parsed as XML)

and error in error.log
[Wed May 13 00:06:09.148851 2020] [proxy_fcgi:error] [pid 20728:tid 140099508418304] [client 192.168.2.20:37480] AH01071: Got error ‘PHP message: PHP Notice: Undefined variable:
depositedIds in /var/www/uars/plugins/generic/sword/SwordImportExportPlugin.inc.php on line 139’, referer: https://uars.info/index.php/uars/management/importexport/plugin/SwordImportExportPlugin

Hi - The notice in the Log (“undefined variable”) is something to fix but it shouldn’t cause any problem. It looks like the response coming back from the server is an error and is not XML. Do you have any information about the endpoint that I can look at, like the service document?

i have found this:
https://v2.sherpa.ac.uk/api/
https://v2.sherpa.ac.uk/api/metadata-schema.html
https://v2.sherpa.ac.uk/api/object-retrieval.html

Hi @redukr,

Are you sure the Sherpa API is SWORD compliant? It looks like a proprietary REST API to me, rather than something that uses SWORD.

Regards,
Alec Smecher
Public Knowledge Project Team

i event don’t think about differences in api. because i am not programmer. so i try to connect “as is”. i saw that in settings of SWORD plugin was login\password\endpoint and at sherpa was login\password\endpoint and just try to connect. :slight_smile: now i start thinking that i try to connect two pipes with insulating tape. :thinking::thinking::thinking:

1 Like

Yes, SWORD is a specific API. A sword client (OJS) will only work with a sword server. There is more info here: http://swordapp.org/

1 Like

Hi @redukr,

There is not yet a connection between OJS and Sherpa/Romeo. The main reason is that the Sherpa/Romeo service only has information about the deposit policies of the journals, it’s a statement about the possibilities the journal allows the authors to deposit, for example, in institutional repositories.

The SWORD protocol can be used to send the journal files to specific repositories, but, as @brianh stated, the repository needs to have a SWORD server interface.

One interesting feature may be the possibility to update Sherpa/Romeo service, through the API to update the journal policies :wink:

Regards,

José Carvalho

3 Likes

Thank’s a lot for explanation!