From 87c84bd82e26a0846a37be94a83dfdc94ea4aa7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilius=20=C5=A0umskas?= Date: Thu, 5 Nov 2020 00:39:34 +0200 Subject: [PATCH] Fix running scheduled search index job. (#104) Arguments need to be passed as an array since passing shell commands as a string to the Process component is deprecated since Symfony 4.2. Related Grav fix which is also needed for this patch to work properly: https://github.com/getgrav/grav/commit/1661dc9ef7cc3ca921135c5a1e256aac03c4984c This also finally fixes issue #81. --- tntsearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tntsearch.php b/tntsearch.php index 252a98a..c8d395f 100644 --- a/tntsearch.php +++ b/tntsearch.php @@ -110,7 +110,7 @@ public function onSchedulerInitialized(Event $e): void $scheduler = $e['scheduler']; $at = $this->config->get('plugins.tntsearch.scheduled_index.at'); $logs = $this->config->get('plugins.tntsearch.scheduled_index.logs'); - $job = $scheduler->addCommand('bin/plugin tntsearch index', [], 'tntsearch-index'); + $job = $scheduler->addCommand('bin/plugin', ['tntsearch', 'index'], 'tntsearch-index'); $job->at($at); $job->output($logs); $job->backlink('/plugins/tntsearch');