ulsdevteam / pkp-clamav

Clam AV plugin for PKP OJS / OMP
GNU General Public License v2.0
5 stars 5 forks source link

AJAX URL is malformed #1

Closed ctgraham closed 4 years ago

ctgraham commented 5 years ago

The AJAX URL is constructed here: https://github.com/ulsdevteam/pkp-clamav/blob/e618fcb771a45938bdc7a3e4c3487fce9bc05dfe/ClamavSettingsForm.inc.php#L50 and here: https://github.com/ulsdevteam/pkp-clamav/blob/e618fcb771a45938bdc7a3e4c3487fce9bc05dfe/ClamavSettingsForm.inc.php#L63

This places the string 'clamav' in the context position, where a journal context should be provided. (URL construction is index.php/context/page/op/etc).

This works for now because nothing is interrogating the context within the custom page handler or call stack, but will fail if/when this occurs.

ctgraham commented 5 years ago

For reasons unclear to me, the seemingly plausible fix of: $this->setData('pluginAjaxUrl', $request->getRouter()->url($request, null, 'clamavVersion')); does not work. Hrm.

ctgraham commented 4 years ago

Resolved via #5.