Problems with the DOI-CrossRef automatic registration

No it doesn’t submit at all i keep checking the Crossref website and the doi itself doesn’t work … i have to click on the register button manually from the crossref plugin then it works fine

but when i publish it even tho the DOI is assigned, the username and pass are correct and all other requirements are met … nothing happens

i tried to enable and disable tha Acron plugin but nothing happened also…

and i don’t get any errors… it’s just not deposit there is no attempt to deposit the doi

What appears in your scheduled task log for this task? In your files_dir you should find files like scheduledTaskLogs/CrossRefautomaticregistrationtask-<md5hash>-<yyyymmdd>.log

For what dates do you see log files, and what is the contents of those logs?

I’m sorry for the stupid question but where can i find these log files?.. I’m new to all this to be honest

I tried to run the file plugins/importexport/crossref/CrossrefInfoSender.php manually to see if it will work and register the unregistered DOIs or not… i got an error in line 16

I looked in my OJS directory and found that lib/pkp/ is empty
so i downloaded the pkp library there

i tried to run it again and got the same error

am i doing something wrong?>

I tried to run the
[ScheduledTask.inc.php]
(https://github.com/pkp/pkp-lib/blob/master/classes/scheduledTask/ScheduledTask.inc.php)

It gave me an error in the line trying to call the library ScheduledTaskHelper.inc.php

Tried to run
[ScheduledTaskHelper.inc.php]
(https://github.com/pkp/pkp-lib/blob/master/classes/scheduledTask/ScheduledTaskHelper.inc.php)

Also got an error in the first class line

Can anyone help?

The files_dir is setup within your config.inc.php. It points to a private (not-web-exposed) directory where submission files and log files and private files are stored.

If you are deploying the application from the Git development source, you will need to initialize all of the git submodules to have a functioning system. Unfortunately, most of the current documentation no longer accurately reflects the 2.x deployment.

This becomes even more important in 3.x, where the git submodules and composer and npm dependencies will all be required.

Alternatively, you can deploy a pre-built package from the releases:
https://pkp.sfu.ca/ojs/ojs_download/

You won’t be able to execute an arbitrary PHP file manually outside of the PKP framework. Multiple requirements need to be bootstrapped in order for have the framework dependencies available. To run the Crossref automatic registration scheduled task, for example, would be (as your web user):

php tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml

https://docs.pkp.sfu.ca/admin-guide/en/statistics#2-configure-a-server-side-cron-job

I tried to run the line you just gave me and got this

Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in …/lib/pkp/classes/core/PKPApplication.inc.php on line 545

Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in …/lib/pkp/classes/core/PKPApplication.inc.php on line 513

Fatal error: Cannot use ‘String’ as class name as it is reserved in …/lib/pkp/classes/core/String.inc.php on line 57

what should i do?

The fatal error here appears to be running an older version of OJS 2.x under PHP7.

To use the last released distribution of OJS 2.4.8-4, you will need to be using PHP5.

To use PHP7, you can use the stable-2_4_8 branch from git.

@asmecher, how about that 2.4.8-5 release?

I asked the system admin and he said that we are using 5.6 already

What specific version of 5.6 are you using? You can find this with php -v from the command line.

String should be ok in 5.6, I think, but maybe you have a special build?

Also note that multiple versions of PHP can be installed at the same time, with one version used for web processes, another for the default CLI, and others for CLI use by explicit naming.

PHP version is 5.6.40 … i got it from the OJS Administrator system info page

OS platform Linux
PHP version 5.6.40
Apache version Not available
Database driver mysql
Database server version 10.2.23-MariaD

If the error message Fatal error: Cannot use ‘String’ as class name as it is reserved is coming from the command line, you’ll need to run php -v from the command line to see what version of PHP is the default there. This may be different than the version of PHP running for the web user.

When i asked the admin to run php -v it gave us 7.1
i told him that it should be 5.6 he said that’s because we are using cpanel and the main domain is 7.1 but the subdomain the one that has the OJS is set to 5.6.40 … and when he tried before to change it from the cpanel to 7.1 the journal website didn’t work at all
but currently it’s working and some of the features like the automtic registration or probably all tasks not working

How is this possible?

can u advise on what we should do?

For automatic registration to work, you will need to either be using the acron plugin, or using a system cron task to run the command line version of the scheduled task. If using the acron plugin, the automatic registration will occur based on normal web traffic to you site. If using the system cron for a scheduled task, you will need to ensure this runs with a compatible version of PHP.

With either of these setup, you will see scheduled task logs in your files_dir, under the names of scheduledTaskLogs/CrossRefautomaticregistrationtask-<md5hash>-<yyyymmdd>.log. Success or failure of the automatic registration will be recorded there.

I enabled Acron plugin and pressed the reload scheduled tasks … and then checked the log files, i found that all of them say …Task started … Task stopped…
and nothing else … all of the logs including crossref and automatic reminders and all say the same

Can you confirm that the option “OJS will deposit assigned DOIs automatically to CrossRef.” is checked in your CrossRef XML Export Plugin settings?

It is checked and the username and password are inserted correctly i checked multiple times… it register when i manually click on register

It is hard to know what is going on here with the empty log messages.

OJS will run the following SQL when looking for articles to be registered:

			SELECT	pa.*,
				a.*,
				COALESCE(stl.setting_value, stpl.setting_value) AS section_title,
				COALESCE(sal.setting_value, sapl.setting_value) AS section_abbrev
			FROM	published_articles pa
				INNER JOIN articles a ON pa.article_id = a.article_id
				LEFT JOIN sections s ON s.section_id = a.section_id
				LEFT JOIN section_settings stpl ON (s.section_id = stpl.section_id AND stpl.setting_name = 'title' AND stpl.locale = ?)
				LEFT JOIN section_settings stl ON (s.section_id = stl.section_id AND stl.setting_name = 'title' AND stl.locale = ?)
				LEFT JOIN section_settings sapl ON (s.section_id = sapl.section_id AND sapl.setting_name = 'abbrev' AND sapl.locale = ?)
				LEFT JOIN section_settings sal ON (s.section_id = sal.section_id AND sal.setting_name = 'abbrev' AND sal.locale = ?)
				INNER JOIN article_settings ast ON a.article_id = ast.article_id
				WHERE	ast.setting_name = ? AND ast.setting_value = 'crossref::registeredDoi'
				AND a.journal_id = ?
			ORDER BY pa.issue_id, a.article_id

Are you able to run SQL queries directly in the database?

If you replace the first three ? with your primary locale in quotes (e.g. ‘en_US’) and the last ? with your journal id (probably 1 if you have a single journal), what results do you get when you run the query?

Just to be clear i’d set

  1. “locale = ?” to en_US
  2. “journal_id = ?” to 1 (i have 4 journals but i’ll try on the first one)
    But
  3. What about this “ast.setting_name = ?”

Should i leave it as it is?

and I’ll see with the system admin and get back to you first thing in the morning

and btw thanx for trying to resolve this with me and sorry if i don’t understand much of the php and database stuff