[BUGFIX] Omit `overrideVals` in NewRecordController 61/58561/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 2 Oct 2018 14:51:38 +0000 (16:51 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Fri, 5 Oct 2018 14:33:22 +0000 (16:33 +0200)
In the old times of pages_language_overlay, the "New Record" wizard
automatically re-used the doktype of the parent table which was `pages`.
Since pages_language_overlay vanished, the `overrideVals` in the links in
the wizard use the `pages` table.

This results in invalid value for `doktype` if a page in pid=0 is
created, as pid=0 has no doktype.

For this reason, the `overrideVals` parameter is removed.

Resolves: #86547
Related: #82445
Releases: master
Change-Id: I6efa699e5ef09eed6321ae68b5838682214376de
Reviewed-on: https://review.typo3.org/58561
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Guido Schmechel <guido.schmechel@brandung.de>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
typo3/sysext/backend/Classes/Controller/NewRecordController.php

index 3f3679a..89fb110 100644 (file)
@@ -846,8 +846,6 @@ class NewRecordController
         if ($table === 'pages' && $addContentTable) {
             $urlParameters['tt_content']['prev'] = 'new';
             $urlParameters['returnNewPageId'] = 1;
-        } elseif ($table === 'pages') {
-            $urlParameters['overrideVals']['pages']['doktype'] = (int)$this->pageinfo['doktype'];
         }
 
         $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);