[BUGFIX] Settings for local drivers are not shown by default 87/19187/3
authorNicole Cordes <typo3@cordes.co>
Fri, 22 Mar 2013 15:11:35 +0000 (16:11 +0100)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sat, 23 Mar 2013 11:26:53 +0000 (12:26 +0100)
If you create a new storage the LocalDriver is selected by default
(because it is the first registered driver) but the flexform field is not
shown. Because of the hidden configuration field you cannot set up the
base path until you have saved the storage record. Local driver should be
selected by default and configuration field should be displayed every
time.

Change-Id: Ic9c6c1eb7ca3d9f45723dce728558002440ae9da
Fixes: #46555
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19187
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Andreas Wolf
Tested-by: Andreas Wolf
typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php
typo3/sysext/core/Configuration/TCA/sys_file_storage.php

index 5c82f6e..5097e03 100644 (file)
@@ -97,12 +97,12 @@ class DriverRegistry implements \TYPO3\CMS\Core\SingletonInterface {
                if (TYPO3_MODE !== 'BE') {
                        return;
                }
+               $driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
+               $configurationFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
                foreach ($this->driverConfigurations as $driver) {
                        $label = $driver['label'] ?: $driver['class'];
-                       $driverFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['driver']['config'];
                        $driverFieldConfig['items'][] = array($label, $driver['shortName']);
                        if ($driver['flexFormDS']) {
-                               $configurationFieldConfig = &$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']['config'];
                                $configurationFieldConfig['ds'][$driver['shortName']] = $driver['flexFormDS'];
                        }
                }
index c5f30b1..5b514de 100644 (file)
@@ -94,7 +94,8 @@ return array(
                        'config' => array(
                                'type' => 'select',
                                'items' => array(),
-                               'default' => ''
+                               'default' => 'Local',
+                               'onChange' => 'reload'
                        )
                ),
                'configuration' => array(
@@ -105,7 +106,6 @@ return array(
                                'ds_pointerField' => 'driver',
                                'ds' => array()
                        ),
-                       'displayCond' => 'REC:NEW:false'
                )
        ),
        'types' => array(