defstat / pln

GNU General Public License v3.0
0 stars 8 forks source link

Enabling the plugin in OJS 3 does not set up scheduled tasks #16

Closed ubermichael closed 6 years ago

ubermichael commented 6 years ago

I cloned the plugin to an OJS 3 instance in plugins/generic/pln. I enabled it and got the terms of use and agreed to them. But the plugin didn't set up a task in the scheduled_tasks table like it would have in OJS 2. As a result, none of the scheduled tasks are firing automatically either via acron or via system cron.

OJS 3.1.1.1 release (not from git) PHP 5.6.36 MySQL Ver 14.14 Distrib 5.7.22, for osx10.11 (x86_64) OS X 10.11 Apache 2.4.28

I'm happy to help debug this, but I don't know enough about OJS 3 or the task system to fix it.

ubermichael commented 6 years ago

/cc: @mjordan

defstat commented 6 years ago

Hi @ubermichael! Thanks for bringing that up. You are right, indeed enabling the plugin does not add the Depositor class to the scheduled_tasks table, even though the code seems to register the appropriate hook. I will check the reason for that.

In any case, if you run the Acron's plugin reload scheduled tasks function from the Plugin's table, then the Depositor task is added successfully.

defstat commented 6 years ago

@ubermichael @mjordan

It seems that this behavior is indented. There is that issue https://github.com/pkp/pkp-lib/issues/2550 which may alter that, but for now the way to go is to run the "Reload scheduled tasks" function of the AcronPlugin.

If you agree I will close this issue for now.

ubermichael commented 6 years ago

Well, if that's the official way to do things I guess we have no choice. But there will be a lot of journals that don't follow that step, even if the documentation or UI is updated with instructions like this.

defstat commented 6 years ago

@ubermichael yes I know. It seems to be the way for now though.

mjordan commented 6 years ago

Perhaps we should be requiring Acron as dependency for the PLN plugin?

defstat commented 6 years ago

Yes the Acron plugin should be enabled.

mjordan commented 6 years ago

OK, I'll specify that as a dependency in the testing instructions.