DOI registration not working via command-line

Hi,
it seems there is an error in OJS 2.4.6 with Postgres for registering DOIs (checked with mEDRA) via command line, using the import/export tool
Here is an example of the command that I launced

php tools/importExport.php MedraExportPlugin register aib article 11003

where aib is the journal-path and 11003 is the article id.

When I check for the registered url for this DOI in mEDRA database, I find http://my.ojs.site/ojs//index.php/index/article/view/11003 with ‘index’ as journal path and not ther right one for the journal.

Launching the tool I obtain this report

ojs2 has produced an error
Message: WARNING: assert(): Assertion failed
In file: /var/www/ojs/classes/plugins/PubIdPlugin.inc.php
At line: 225
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.39-0+deb7u2
Apache Version: N/A
DB Driver: postgres
DB server version: PostgreSQL 9.1.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
ojs2 has produced an error
Message: WARNING: Invalid argument supplied for foreach()
In file: /var/www/ojs/classes/plugins/PubIdPlugin.inc.php
At line: 363
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.39-0+deb7u2
Apache Version: N/A
DB Driver: postgres
DB server version: PostgreSQL 9.1.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
ojs2 has produced an error
Message: WARNING: assert(): Assertion failed
In file: /var/www/ojs/classes/plugins/PubIdPlugin.inc.php
At line: 263
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.39-0+deb7u2
Apache Version: N/A
DB Driver: postgres
DB server version: PostgreSQL 9.1.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
ojs2 has produced an error
Message: WARNING: Invalid argument supplied for foreach()
In file: /var/www/ojs/classes/plugins/PubIdPlugin.inc.php
At line: 367
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.4.39-0+deb7u2
Apache Version: N/A
DB Driver: postgres
DB server version: PostgreSQL 9.1.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
Registration successful!

I found this behavior only using the php tool via cli; otherwise, if I try to register DOIs via the OJS interface, all is working correctly

Thanks for help,
Andrea

Hi Andrea,

I will take a look i.e. test it on my system…

Thanks!
Bozana

Hi Andrea,

I found the problem for the wrong URLs. S. the issue and the commits there: Wrong URL when exporting and registering DOIs via command line · Issue #822 · pkp/pkp-lib · GitHub.
I couldn’t reproduce and don’t understand the warning messages, but hope that the problem will be solved after applying the patch. If you could test it somehow, it would be perfect!

Thanks and best wishes!
Bozana

Hi bozana,
I tested your patch (only against mEDRA) and it’s working.
Tomorrow I’ll test against Datacite.

The error messages, otherwise, are still there
andrea