[BUGFIX] ElementBrowser: Fix JS error after folder creation 12/36912/3
authorNicole Cordes <typo3@cordes.co>
Sat, 14 Feb 2015 19:45:42 +0000 (20:45 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 14 Feb 2015 23:10:16 +0000 (00:10 +0100)
Add missing parameters in returnUrl to prevent a Javascript error
blocking all further Javascript execution.

Releases: master, 6.2
Resolves: #65074
Change-Id: I34cb27eaf9678b6bab1297b579fec3a6d5385149
Reviewed-on: http://review.typo3.org/36912
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php

index bda2a8a..8cb7e52 100644 (file)
@@ -2580,7 +2580,8 @@ class ElementBrowser {
                // Make footer of upload form, including the submit button:
                $redirectValue = $this->getThisScript() . 'act=' . $this->act . '&mode=' . $this->mode
                        . '&expandFolder=' . rawurlencode($folderObject->getCombinedIdentifier())
-                       . '&bparams=' . rawurlencode($this->bparams);
+                       . '&bparams=' . rawurlencode($this->bparams)
+                       . (is_array($this->P) ? GeneralUtility::implodeArrayForUrl('P', $this->P) : '');
                $code .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($redirectValue) . '" />'
                        . FormEngine::getHiddenTokenField('tceAction')
                        . '<input class="btn btn-default" type="submit" name="submit" value="'