From c68bade86daac33a6b880e88ca4a02b69830efc6 Mon Sep 17 00:00:00 2001 From: Fritz Michael Gschwantner Date: Fri, 9 Aug 2024 15:16:34 +0100 Subject: [PATCH] Do not use $dc->id for SlugGenerator (see #107) * Do not use `$dc->id` for SlugGenerator bf2c169ec7052cba98baae24a16b91cd67c29889 --- src/EventListener/DataContainer/StyleManagerListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EventListener/DataContainer/StyleManagerListener.php b/src/EventListener/DataContainer/StyleManagerListener.php index 8e2bf57..33bb051 100644 --- a/src/EventListener/DataContainer/StyleManagerListener.php +++ b/src/EventListener/DataContainer/StyleManagerListener.php @@ -85,7 +85,7 @@ public function generateAlias($varValue, DataContainer $dc): string // Generate an alias if there is none if ($varValue == '') { - $varValue = System::getContainer()->get('contao.slug')->generate($dc->activeRecord->title, $dc->id, $aliasExists); + $varValue = System::getContainer()->get('contao.slug')->generate($dc->activeRecord->title, [], $aliasExists); } elseif ($aliasExists($varValue)) {