pkp / pln

PKP Preservation Network Plugin
https://docs.pkp.sfu.ca/pkp-pn/en/
GNU General Public License v3.0
2 stars 5 forks source link

Plugin is unable to cleanup after journal is removed #68

Closed jonasraoni closed 1 year ago

jonasraoni commented 1 year ago

There's some code to cleanup data here: https://github.com/pkp/pln/blob/49f2b9065b912ffb915c3cf40fb00a1942604276/PLNPlugin.inc.php#L92

But it depends on a non-existent hook, and at the administrative part (/admin/contexts) where the journal is supposed to be removed, standard plugins are not loaded, so there's no way to listen for the right hook (Context::delete).

The cleanup might be done inside the scheduled task. Another possibility would be to investigate the behavior of enabling the "site-wide" setting, which would be the only way to get the plugin loaded at the right time.