[BUGFIX] Properly create slug if adding new pages via FormEngine
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Form / Element / InputSlugElement.php
index fc49de3..879df50 100644 (file)
@@ -155,7 +155,7 @@ class InputSlugElement extends AbstractFormElement
                 '',
                 [
                     $table,
-                    $this->data['vanillaUid'] < 0 ? abs($this->data['vanillaUid']) : $this->data['effectivePid'],
+                    $this->data['effectivePid'],
                     $row['uid'],
                     $languageId,
                     $this->data['fieldName'],
@@ -165,7 +165,7 @@ class InputSlugElement extends AbstractFormElement
             FormSlugAjaxController::class
         );
         $optionsForModule = [
-            'pageId' => $this->data['vanillaUid'] < 0 ? abs($this->data['vanillaUid']) : $this->data['effectivePid'],
+            'pageId' => $this->data['effectivePid'],
             'recordId' => $row['uid'],
             'tableName' => $table,
             'fieldName' => $this->data['fieldName'],