[BUGFIX] EXT:filelist Fixed exception when creating new text file 19/55419/2
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 21 Jan 2018 11:50:51 +0000 (12:50 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 29 Jan 2018 10:07:09 +0000 (11:07 +0100)
The exception does not occur with the LocalDriver.
For testing use the driver mentioned in the forge issue.

Resolves: #83627
Releases: master, 8.7
Change-Id: Iae5fef2cc1ca704998975aba4fb6f5e48aeec4b1
Reviewed-on: https://review.typo3.org/55419
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Henning Liebe <h.liebe@neusta.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Jan Stockfisch <jan.stockfisch@googlemail.com>
Tested-by: Jan Stockfisch <jan.stockfisch@googlemail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Controller/File/FileController.php

index c6e0a13..136439f 100644 (file)
@@ -182,8 +182,11 @@ class FileController
 
         // go and edit the new created file
         if ($request->getParsedBody()['edit']) {
 
         // go and edit the new created file
         if ($request->getParsedBody()['edit']) {
+            /** @var \TYPO3\CMS\Core\Resource\File $file */
+            $file = $this->fileData['newfile'][0];
+            $properties = $file->getProperties();
             $urlParameters = [
             $urlParameters = [
-                'target' => $this->file['newfile'][0]['target'] . $this->file['newfile'][0]['data']
+                'target' =>  $properties['storage'] . ':' . $properties['identifier']
             ];
             if ($this->redirect) {
                 $urlParameters['returnUrl'] = $this->redirect;
             ];
             if ($this->redirect) {
                 $urlParameters['returnUrl'] = $this->redirect;