This commit is contained in:
Jürgen Mummert
2025-12-28 10:59:50 +01:00
parent b0337dcc6c
commit 0cf9703a9b
2 changed files with 4 additions and 6 deletions
@@ -4,7 +4,6 @@ namespace MummertMedia\ContaoMeilisearchBundle\Controller\FrontendModule;
use Contao\Config; use Contao\Config;
use Contao\CoreBundle\Controller\FrontendModule\AbstractFrontendModuleController; use Contao\CoreBundle\Controller\FrontendModule\AbstractFrontendModuleController;
use Contao\FrontendTemplate;
use Contao\ModuleModel; use Contao\ModuleModel;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
@@ -16,11 +15,7 @@ class MeilisearchSearchController extends AbstractFrontendModuleController
ModuleModel $model, ModuleModel $model,
Request $request Request $request
): Response { ): Response {
// In Contao 4.13 ist $template immer FrontendTemplate // Beide Template-Typen unterstützen Property-Zugriff
if (!$template instanceof FrontendTemplate) {
throw new \RuntimeException('Expected FrontendTemplate');
}
$template->meiliLimit = (int) ($model->meiliLimit ?: 50); $template->meiliLimit = (int) ($model->meiliLimit ?: 50);
$template->meiliHost = Config::get('meilisearch_host'); $template->meiliHost = Config::get('meilisearch_host');
$template->meiliIndex = Config::get('meilisearch_index'); $template->meiliIndex = Config::get('meilisearch_index');
@@ -0,0 +1,3 @@
Time,Source,URI,"Found on URI","Found on level",Tags,Message
"2025-12-28 10:44:12.357228","Contao\CoreBundle\Crawl\Escargot\Subscriber\SearchIndexSubscriber",https://flowerpowerabi.de/,https://flowerpowerabi.de/sitemap.xml,3,,"Forwarded to the search indexer. Was indexed successfully."
"2025-12-28 10:44:12.413689","Contao\CoreBundle\Crawl\Escargot\Subscriber\SearchIndexSubscriber",https://flowerpowerabi.de/testseite-fuer-meilisearch,https://flowerpowerabi.de/sitemap.xml,3,,"Forwarded to the search indexer. Was indexed successfully."
1 Time Source URI Found on URI Found on level Tags Message
2 2025-12-28 10:44:12.357228 Contao\CoreBundle\Crawl\Escargot\Subscriber\SearchIndexSubscriber https://flowerpowerabi.de/ https://flowerpowerabi.de/sitemap.xml 3 Forwarded to the search indexer. Was indexed successfully.
3 2025-12-28 10:44:12.413689 Contao\CoreBundle\Crawl\Escargot\Subscriber\SearchIndexSubscriber https://flowerpowerabi.de/testseite-fuer-meilisearch https://flowerpowerabi.de/sitemap.xml 3 Forwarded to the search indexer. Was indexed successfully.