From b87ddbcfe3c08531ec0be4aeed8534fd7841e8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vilius=20=C5=A0umskas?= Date: Sat, 24 Oct 2020 11:58:18 +0300 Subject: [PATCH] Fix running scheduled search index job. 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');