Trouble setting up PKP PN

Describe the issue or problem

We’re working to get PKP PN working for all the journals we host, starting with the Engaged Scholars Journal. (https://esj.usask.ca/index.php/esj) There are two main problems.

First, the plugin doesn’t seem to trigger automatically, we currently have to do it by hand.

Second, we haven’t managed to deposit any issues yet.

We checked the forum for other posts about PKP PN but didn’t find anything directly relevant.

Steps I took leading up to the issue

  1. Tried to force plugin to pick up journal manually since automatic queuing wasn’t working
  2. Sits pending/in progress until it gets an error message
  3. Tried again pushing just a couple issues instead of whole journal
  4. getting an error 3-4 days after trying to deposit an issue ’ The deposit didn’t pass the payload validation, you may try to resend the deposit’

What application are you using?
OJS 3.4.0.9, and PKP PN is up to date too

Additional information

This journal has been around for 10 years, and recently moved from PKP Hosting to USask hosting. It’s possible that something in the database hasn’t been cleaned up and is causing errors?

Thanks!

Hi @ehopkins!

First, the plugin doesn’t seem to trigger automatically, we currently have to do it by hand.

Do you see files starting with Depositor- at the folder {$files_dir}/scheduledTaskLogs? A new one should be created every day.

If not, then you might try to reload the tasks at the Acron plugin, see image:

If the scheduled task is running (you might also inspect the last_run column of this query select * from scheduled_tasks, the task related to the PKP PN is the APP\plugins\generic\pln\classes\tasks\Depositor).

Another possibility would be a broken scheduled task interrupting the flow, because the processing of tasks at OJS < 3.5 isn’t fail proof… Then, taking a look at the error log might help understanding the root cause.

The deposit didn’t pass the payload validation, you may try to resend the deposit

This is a server-side error, retrying isn’t going to help, I’ll check what’s happening and come up with an update.

Best,
Jonas Raoni

@ehopkins I’ve tried to download a couple of issues and I got a 404 on all of them. Please, check if the deposits files were created at {$files_dir}/journals/{$journalId}/pln, as an example, this is the last one that I have on our side: ​A7EEF311-F472-48B7-A532-3ABF0B91F497 (there should be a folder with this name and inside it a .zip file).

If not, then we’ll need to understand what’s happening there.

Best,
Jonas Raoni

@ehopkins Thanks for getting this started :slight_smile:

@jonasraoni Okay we’ve got a cronjob on our server that runs php tools/runScheduledTasks.php nightly. I setup the PKP PN plugin via the user interface. When I set it up initially it wouldn’t load. I had to disable and reenable it to get the form to pop up and accept it. We migrated this from PKP last summer and upgraded from 3.3 to 3.4, looks like U of C had it before you guys so it’s a bit old and has some historic stuff in the DB I suspect.

I’ve been able to manually trigger it via php tools/runScheduledTasks.php plugins/generic/pln/xml/scheduledTasks.xml in which case it does generate depositor files like ‘Feb 17 13:10 Depositor-6994bd0332ffd-20260217.log’ and updates the interface. I don’t see any actual zip files though so seems like it’s not getting that far, but the UI updates and says it started deposit process.

Currently the plugin doesn’t run via our scheduled tasks like the other processes do, for example.

 scheduled_task_id | class_name                                      | last_run            |
+-------------------+-------------------------------------------------+---------------------+
|                 1 | APP\plugins\importexport\doaj\DOAJInfoSender    | 2025-09-10 04:49:42 |
|                 2 | APP\tasks\SubscriptionExpiryReminder            | 2026-02-01 03:15:02 |
|                 3 | classes.tasks.ReviewReminder                    | 2019-06-03 08:00:03 |
|                 4 | PKP\task\ReviewReminder                         | 2026-02-26 03:15:02 |
|                 5 | PKP\task\StatisticsReport                       | 2026-02-01 03:15:02 |
|                10 | PKP\task\DepositDois                            | 2026-02-26 03:15:02 |
|                11 | PKP\task\RemoveUnvalidatedExpiredUsers          | 2026-02-01 03:15:02 |
|                12 | PKP\task\EditorialReminders                     | 2026-02-01 03:15:02 |
|                13 | PKP\task\UpdateIPGeoDB                          | 2026-02-10 03:15:02 |
|                14 | APP\tasks\UsageStatsLoader                      | 2026-02-26 03:15:02 |
|                15 | PKP\task\ProcessQueueJobs                       | 2026-02-27 03:15:01 |
|                16 | PKP\task\RemoveFailedJobs                       | 2026-02-01 03:15:02 |
|                17 | APP\tasks\OpenAccessNotification                | 2026-02-26 03:15:02 |
|                18 | APP\plugins\generic\pln\classes\tasks\Depositor | 2026-02-17 13:09:55 

Hi Jonas! Thanks for your response to this. My colleague Chris responded below with some more details, any thoughts on what we should try next? thanks for your help with this.

Hi again, just following up on this in case anyone has suggestions for me and Chris to try. Thanks!

Hi @cpockett,

Yeah, if you’re running the scheduled tasks through the tools/runScheduledTasks.php script, then it’s really needed to include the task/file of the plugin, just like you did (I think this is poorly documented at the moment, but plugins that have scheduled tasks do require it). I didn’t like this approach as well, and someone in the team got it addressed, I just can say this is a solved problem in OJS 3.5 (plugins can subscribe to the “execution pipeline” and the Acron plugin has been removed).

What do you see in this log file? Please, also provide errors from the server’s error log, only the ones that happened during the task execution are relevant, so just check the entries from the latest 24h (or that happened near to the last execution time).

Best,
Jonas Raoni

Hi @jonasraoni,

I ran it via CLI, no error messages on screen. Here is the output from the scheduled task log.

[2026-04-09 15:45:25] https://esj.usask.ca
[2026-04-09 15:45:25] [Notice] Task process started.
[2026-04-09 15:45:25] [Notice] PKP Preservation Network Processor
[2026-04-09 15:45:25] [Notice] Depositor processing for Engaged Scholar Journal: Community-Engaged Research, Teaching, and Learning.
[2026-04-09 15:45:25] [Notice] Getting service document.
[2026-04-09 15:45:25] [Notice] Processing new content.
[2026-04-09 15:45:25] [Notice] Processing updated content.
[2026-04-09 15:45:25] [Notice] Packaging content for deposit.
[2026-04-09 15:45:25] [Notice] Processing deposit status updates.
[2026-04-09 15:45:25] [Notice] Trying status update for 94 (Issue: 4759) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:26] [Notice] Processing status got for 94 → (payload-error)
[2026-04-09 15:45:26] [Notice] Trying status update for 95 (Issue: 4760) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:26] [Notice] Processing status got for 95 → (payload-error)
[2026-04-09 15:45:26] [Notice] Trying status update for 96 (Issue: 4761) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:26] [Notice] Processing status got for 96 → (payload-error)
[2026-04-09 15:45:26] [Notice] Trying status update for 97 (Issue: 4762) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:26] [Notice] Processing status got for 97 → (payload-error)
[2026-04-09 15:45:26] [Notice] Trying status update for 98 (Issue: 4763) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:27] [Notice] Processing status got for 98 → (payload-error)
[2026-04-09 15:45:27] [Notice] Trying status update for 99 (Issue: 4764) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:27] [Notice] Processing status got for 99 → (payload-error)
[2026-04-09 15:45:27] [Notice] Trying status update for 100 (Issue: 4765) (Local Status: [Transferred], Processing Status: [Received], Lockss Status: [Unknown])
[2026-04-09 15:45:27] [Notice] Processing status got for 100 → (payload-error)


[2026-04-09 15:45:31] [Notice] Sending deposits to the PKP PN.
[2026-04-09 15:45:31] [Notice] Pruning orphaned deposits.
[2026-04-09 15:45:31] [Notice] Task process stopped.

Thanks,

-Chris

Great! So looks like the plugin is working fine.

Please, try to resubmit one of the issues that have failed through the plugin settings. If no deposit file gets generated somewhere inside the folder {$files_dir}/journals/{$journalId}/pln, then:

  • Check the server’s error log (not the plugin’s log, which is ok). Do you see any relevant error?
  • Does the folder above have proper permissions? As you’ve migrated from another host, it could be relevant…
  • Do you have any anti-virus/service that might remove files automatically?

If nothing above makes sense, then you may try to generate one of the defective deposits through the Native XML plugin’s UI, which you can access through Tools > Native XML Plugin > Export Issues.

Best,
Jonas Raoni

Okay, I tried via the interface and seems like it started working.

For reference there arn’t any errors, complaints about folder permissions, and while we do have anti-virus it doesn’t look like it’s affecting these but it may be worth digging more if this doesn’t work out. I did try the native XMl plugin and it kicked out a file which looked reasonable.

Seems like the scheduled task only moves along after I restart the process via the interface.

I’ve set an extra cron job to run after scheduled tasks for php tools/runScheduledTasks.php plugins/generic/pln/xml/scheduledTasks.xml daily. It looks like this will only run daily so testing has been slow on my end.

I’ve still had to run by hand to get logs to generate, so I likely need to give it more time between attempts. I did see both logs have generated files this time and also indicated they were posted to atom, which I assume is you’re end. The UI still indicates in progress status for them all so not sure if there is more to do or just wait.

I’m away for a few day so, I’ll let it run and adjust early next week. I can supply log files if that helps trouble shoot. I feel like I’m close to having it sorted.

Thanks.
-Chris

Hi @cpockett,

I guess you haven’t solved this issue yet, right?

To avoid waiting for a day, you can setup the last_run column from the scheduled_tasks table to a date in the past. If you’re done with the issues at your side, I can check what’s happening on ours.

Best,
Jonas Raoni

Hi @jonasraoni,

Sorry for the delay, been busy between vacations and covering support. Okay, I see 5 journal issues on http://pkp.sfu.ca/files/pkppn/onix.csv that indicate they were deposited in the past few months. I see a completed status in the UI as well for them. I’ve tweaked permissions for the cronjobs and requeued the remaining issues that have ‘error’ status from before. I’m hoping those process through as expected. I used that last_run trick to process the queue right away, seems like they are all packaged as expected I’m away for the rest of the week so I’ll look at it early next week.

Hopefully this is all sorted and then I can get our other few journals using this process.
Thanks,
-Chris