diff --git a/src/Command/MeilisearchFilesParseCommand.php b/src/Command/MeilisearchFilesParseCommand.php index a911276..422f514 100644 --- a/src/Command/MeilisearchFilesParseCommand.php +++ b/src/Command/MeilisearchFilesParseCommand.php @@ -102,7 +102,11 @@ class MeilisearchFilesParseCommand extends Command continue; } - $absolutePath = TL_ROOT . '/' . $normalized; + $root = defined('TL_ROOT') + ? TL_ROOT + : $this->framework->getContainer()->getParameter('kernel.project_dir') . '/public'; + + $absolutePath = $root . '/' . $normalized; if (!is_file($absolutePath)) { $this->log('File missing, skip', [