Skip to content

Commit 2021610

Browse files
committed
[BUGFIX] Use static prefix as documented
The documentation says: TCEMAIN.pages.slug.generatorOptions { prefix = /wishlist/ } but the code worked like this: TCEMAIN.pages.slug { prefix = /wishlist/ } The bugfix makes it consistent in the "generatorOptions" namespace, as this option is fully related for the generation of a URL. This way, the documentation does not need adaption. THE CORRECT WAY NOW IS THIS: TCEMAIN.pages.slug.generatorOptions { prefix = /wishlist/ }
1 parent 478c360 commit 2021610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/SlugModifier.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected function resolveHookParameters(array $configuration, $tableName, $fiel
124124
*/
125125
protected function regenerateSlug(SlugHelper $helper): string
126126
{
127-
$prefix = $this->configuration['prefix'] ?? '';
127+
$prefix = $this->configuration['generatorOptions']['prefix'] ?? '';
128128
if ($this->configuration['generatorOptions']['prefixParentPageSlug'] ?? false) {
129129
$languageFieldName = $GLOBALS['TCA'][$this->tableName]['ctrl']['languageField'] ?? null;
130130
$languageId = (int)($this->recordData[$languageFieldName] ?? 0);

0 commit comments

Comments
 (0)