Crossref Manager plugin failed job with FundingPlugin

Hello. We are using OJS 3.4.0.5 We are also having issues with the Crossref Manager plugin. We have failed jobs with logs:

{
“message”: “Call to a member function getId() on null”,
“code”: 0,
“file”: “/var/www/journals.uni-lj.si/ojs/plugins/generic/funding/FundingPlugin.inc.php”,
“line”: 324,
“trace”: [
{
“function”: “addCrossrefElement”,
“class”: “FundingPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/plugins/Hook.php”,
“line”: 139,
“function”: “call_user_func_array”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/plugins/Hook.php”,
“line”: 113,
“function”: “run”,
“class”: “PKP\plugins\Hook”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/filter/Filter.php”,
“line”: 501,
“function”: “call”,
“class”: “PKP\plugins\Hook”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/classes/plugins/PubObjectsExportPlugin.php”,
“line”: 492,
“function”: “execute”,
“class”: “PKP\filter\Filter”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/plugins/generic/crossref/CrossrefExportPlugin.php”,
“line”: 221,
“function”: “exportXML”,
“class”: “APP\plugins\PubObjectsExportPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/plugins/generic/crossref/CrossrefPlugin.php”,
“line”: 296,
“function”: “exportAndDeposit”,
“class”: “APP\plugins\generic\crossref\CrossrefExportPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/jobs/doi/DepositSubmission.php”,
“line”: 63,
“function”: “depositSubmissions”,
“class”: “APP\plugins\generic\crossref\CrossrefPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php”,
“line”: 36,
“function”: “handle”,
“class”: “PKP\jobs\doi\DepositSubmission”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/Util.php”,
“line”: 41,
“function”: “Illuminate\Container\{closure}”,
“class”: “Illuminate\Container\BoundMethod”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php”,
“line”: 93,
“function”: “unwrapIfClosure”,
“class”: “Illuminate\Container\Util”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php”,
“line”: 35,
“function”: “callBoundMethod”,
“class”: “Illuminate\Container\BoundMethod”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/Container.php”,
“line”: 661,
“function”: “call”,
“class”: “Illuminate\Container\BoundMethod”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php”,
“line”: 128,
“function”: “call”,
“class”: “Illuminate\Container\Container”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 141,
“function”: “Illuminate\Bus\{closure}”,
“class”: “Illuminate\Bus\Dispatcher”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 116,
“function”: “Illuminate\Pipeline\{closure}”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php”,
“line”: 132,
“function”: “then”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php”,
“line”: 123,
“function”: “dispatchNow”,
“class”: “Illuminate\Bus\Dispatcher”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 141,
“function”: “Illuminate\Queue\{closure}”,
“class”: “Illuminate\Queue\CallQueuedHandler”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 116,
“function”: “Illuminate\Pipeline\{closure}”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php”,
“line”: 122,
“function”: “then”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php”,
“line”: 70,
“function”: “dispatchThroughMiddleware”,
“class”: “Illuminate\Queue\CallQueuedHandler”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php”,
“line”: 98,
“function”: “call”,
“class”: “Illuminate\Queue\CallQueuedHandler”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Worker.php”,
“line”: 425,
“function”: “fire”,
“class”: “Illuminate\Queue\Jobs\Job”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Worker.php”,
“line”: 375,
“function”: “process”,
“class”: “Illuminate\Queue\Worker”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Worker.php”,
“line”: 173,
“function”: “runJob”,
“class”: “Illuminate\Queue\Worker”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/core/PKPQueueProvider.php”,
“line”: 83,
“function”: “daemon”,
“class”: “Illuminate\Queue\Worker”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/tools/jobs.php”,
“line”: 408,
“function”: “runJobsViaDaemon”,
“class”: “PKP\core\PKPQueueProvider”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/tools/jobs.php”,
“line”: 693,
“function”: “work”,
“class”: “PKP\tools\commandJobs”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/tools/jobs.php”,
“line”: 699,
“function”: “execute”,
“class”: “PKP\tools\commandJobs”,
“type”: “->”
}
]
}

We still haven’t found the solution. Before upgrade of the OJS Crossref pluging wored fine …

Hey @ZalozbaUL, I’ve moved this to its own post since it appears to be a separate issue from the original post.

Could you let me know a few additional things about your install (thanks for including the OJS version and error message!)?

Could you let me know which version of the Funding plugin and Crossref manager plugin you’re using? It looks like the error is happening as a result of something in the Funding plugin, but it would be helpful to know which exact version you’re using.

Thanks.

Regards,

Erik
PKP Team

Dear Erik. Yes, we noticed Funding plugin error in the log. However, even if we disable this plugin, the problem remains. Plugin seems to be up to date:

5 posts were split to a new topic: Call to a member function getSubmissionFilter() on null in DOI submission job

KayWP, that is interesting. We can not even deposit DOI for one submission.

But it is important, that we can deposit DOI via OJS for journal issue, the problem is only with articles.

Dear @ewhanson, please let me know if you need any additional information. I would be very grateful if you could take a look at our error log.
Kind regards. Matevž (University of Ljubljana Press)

Thanks for sharing the details @ZalozbaUL. Do you know how you are running the jobs? Are you using the jobs worker as described in the documentation?

Regards,

Erik
PKP Team

Dear @ewhanson,

The connection between OJS in Crossref is OK in our case. As I said I can register DOI for Issue automaticly (via jobs) but not for articles.

When I deposit DOI for article from OJS, the article stays in status submitted and goes to Failed jobs.

If I export XML for the article and upload it on Crossref web deposit page I get no errors. It seems to be something with Funding plug in. But even if I disabled it I get the same errors in Faild jobs.

Kind regards.
Matevž

I have to check job worker ( in the documentation) with our IT guy, but other jobs (DOAJ export for example) works fine …

Thanks @ZalozbaUL. Two things:

  1. It looks like there’s room for some improved error handling with marking items as failed in the DOI UI if the jobs fails. I’ll get this added.
  2. It does seem like it’s related to the Funding plugin, but it’s curious that you’re still having the issue even with the plugin disabled. I would first suggest trying clearing out any caches (browser cache, clear data and template caches under OJS Administration menu, restarting jobs worker…). If the jobs are still failing after this with the funding plugin disabled, could you share the log of the failed job then? I’m wondering if there’s a different error message.

I will also look into the root cause with the Funding plugin, but I want to make sure there’s not anything else going on, too.

Regards,

Erik
PKP Team

Dear @ewhanson .
I have cleared all browser caches, and in OJS cleared the data and template caches + deleted all failed jobs. The funding plugin is deactivated. Then I deposit only one DOI article and get a failed job same as before:

{
“message”: “Call to a member function getId() on null”,
“code”: 0,
“file”: “/var/www/journals.uni-lj.si/ojs/plugins/generic/funding/FundingPlugin.inc.php”,
“line”: 324,
“trace”: [
{
“function”: “addCrossrefElement”,
“class”: “FundingPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/plugins/Hook.php”,
“line”: 139,
“function”: “call_user_func_array”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/plugins/Hook.php”,
“line”: 113,
“function”: “run”,
“class”: “PKP\plugins\Hook”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/filter/Filter.php”,
“line”: 501,
“function”: “call”,
“class”: “PKP\plugins\Hook”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/classes/plugins/PubObjectsExportPlugin.php”,
“line”: 492,
“function”: “execute”,
“class”: “PKP\filter\Filter”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/plugins/generic/crossref/CrossrefExportPlugin.php”,
“line”: 221,
“function”: “exportXML”,
“class”: “APP\plugins\PubObjectsExportPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/plugins/generic/crossref/CrossrefPlugin.php”,
“line”: 296,
“function”: “exportAndDeposit”,
“class”: “APP\plugins\generic\crossref\CrossrefExportPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/jobs/doi/DepositSubmission.php”,
“line”: 63,
“function”: “depositSubmissions”,
“class”: “APP\plugins\generic\crossref\CrossrefPlugin”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php”,
“line”: 36,
“function”: “handle”,
“class”: “PKP\jobs\doi\DepositSubmission”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/Util.php”,
“line”: 41,
“function”: “Illuminate\Container\{closure}”,
“class”: “Illuminate\Container\BoundMethod”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php”,
“line”: 93,
“function”: “unwrapIfClosure”,
“class”: “Illuminate\Container\Util”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php”,
“line”: 35,
“function”: “callBoundMethod”,
“class”: “Illuminate\Container\BoundMethod”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/Container.php”,
“line”: 661,
“function”: “call”,
“class”: “Illuminate\Container\BoundMethod”,
“type”: “::”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php”,
“line”: 128,
“function”: “call”,
“class”: “Illuminate\Container\Container”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 141,
“function”: “Illuminate\Bus\{closure}”,
“class”: “Illuminate\Bus\Dispatcher”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 116,
“function”: “Illuminate\Pipeline\{closure}”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php”,
“line”: 132,
“function”: “then”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php”,
“line”: 123,
“function”: “dispatchNow”,
“class”: “Illuminate\Bus\Dispatcher”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 141,
“function”: “Illuminate\Queue\{closure}”,
“class”: “Illuminate\Queue\CallQueuedHandler”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php”,
“line”: 116,
“function”: “Illuminate\Pipeline\{closure}”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php”,
“line”: 122,
“function”: “then”,
“class”: “Illuminate\Pipeline\Pipeline”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php”,
“line”: 70,
“function”: “dispatchThroughMiddleware”,
“class”: “Illuminate\Queue\CallQueuedHandler”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php”,
“line”: 98,
“function”: “call”,
“class”: “Illuminate\Queue\CallQueuedHandler”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Worker.php”,
“line”: 425,
“function”: “fire”,
“class”: “Illuminate\Queue\Jobs\Job”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Worker.php”,
“line”: 375,
“function”: “process”,
“class”: “Illuminate\Queue\Worker”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Queue/Worker.php”,
“line”: 173,
“function”: “runJob”,
“class”: “Illuminate\Queue\Worker”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/classes/core/PKPQueueProvider.php”,
“line”: 83,
“function”: “daemon”,
“class”: “Illuminate\Queue\Worker”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/tools/jobs.php”,
“line”: 408,
“function”: “runJobsViaDaemon”,
“class”: “PKP\core\PKPQueueProvider”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/tools/jobs.php”,
“line”: 693,
“function”: “work”,
“class”: “PKP\tools\commandJobs”,
“type”: “->”
},
{
“file”: “/var/www/journals.uni-lj.si/ojs/lib/pkp/tools/jobs.php”,
“line”: 699,
“function”: “execute”,
“class”: “PKP\tools\commandJobs”,
“type”: “->”
}
]
}

Thanks for the detailed job log, @ZalozbaUL.

I can’t quite make sense of why the funding plugin is still causing the issue even when it’s disabled. As a first step, I would try completely uninstalling the Funding plugin and reinstalling it. Then, once reinstalled with the plugin still disabled, you could try the job again.

If that still doesn’t work, with the Funding plugin disabled, you could check the database to see if the Funding plugin is still somehow set as enabled via this SQL query.

select * from plugin_settings where plugin_name = 'fundingplugin' and setting_name = 'enabled';

This should have a setting_value of 0 if the plugin is disabled.

Let me know how that goes and I will look into the underyling issue with the Funding plugin.

Regards,

Erik
PKP Team

Dear @ewhanson

your solution has helped! Many thanks for that.

We deleted the funding plugin and restarted the “Job Worker”. One of these things helped and we have no more failed jobs.

Thank you very much for your support!

Kind regards. Matevž

I also found a problem like this, after I checked again that the permissions on the “files” folder were set to “571” so that it could not write to the folder. finally, I changed the permissions of the “files” folder to “755” and it worked.