Project

General

Profile

Actions

Task #64617

open

Don' change configuration of filestorage if files are present

Added by Ingo Schmitt about 9 years ago. Updated about 5 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2015-01-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:
Remote Sprint

Description

If a file storage contains files, these files are indexed by the configuration setting of the storage. If you change the configuration of the storage (e.g.Case sensitive filesystem) TYPO3 might end up in not finding the files.

Solution: Disable the change of configuration of a file storage, if files are present.


Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #61125: FAL exception if file does not existRejected2014-08-21

Actions
Related to TYPO3 Core - Bug #50871: Remove option to delete a File StorageNew2013-08-07

Actions
Related to TYPO3 Core - Bug #60352: Configuration caseSensitive for sys_file_storage has wrong behaviourClosed2014-07-16

Actions
Related to TYPO3 Core - Bug #70172: Don't change file or directory identifier on createRejected2015-09-29

Actions
Actions #1

Updated by Ingo Schmitt about 9 years ago

  • Complexity set to medium

Idea could be to create a user function to render the field depending on the files inside the storage

Actions #2

Updated by Frans Saris about 9 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Philipp Thiele about 9 years ago

User Experience would be best if we provide a readonly checkbox, probably followed by another (passthrough) field that gives a short explanation about the reason why the checkbox is disabled (there are files in this storage, so you can't change configuration).
We basically have two possible solutions:

  1. we render the field by userFunc, basically like in \TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService
  2. we implement a new tca field config option, that allows to mark and render a field as disable depending of a userFunc

I personally prefer the second option, so that we implement the new tca field config option that is quite similar to displayCond, but instead of hiding the field it only renders it with disabled attribute.
Basically it's the same functionality like its implemented for fields with l10n_config defaultAsReadonly \TYPO3\CMS\Backend\Form\FormEngine (line 1156 ff) - set ['config']['readOnly'] = TRUE, but dependent on the result of a userFunc.
The name of the option has to be discussed, a possible solution could be to taken the config option readOnly and allow a path, class- and method-name in it, or to define a new config option like readOnlyUserCond. This method should return TRUE or FALSE.
TCA config options could look like this:

'case_sensitive' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:lang/locallang_mod_file_list.xlf:localDriverFlexform_caseSensitive',
    'config' => array(
        'type' => 'check',
        'default' => 1,
        'readOnly' => 'typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php:TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService->hasFiles'
    )
),

or in flexform config, as we need it like this for this specific issue:

<caseSensitive>
    <TCEforms>
        <label>LLL:EXT:lang/locallang_mod_file_list.xlf:localDriverFlexform_caseSensitive</label>
        <config>
            <type>check</type>
            <default>1</default>
            <readOnly>typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php:TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService->hasFiles</readOnly>
        </config>
    </TCEforms>
</caseSensitive>
Actions #4

Updated by Mathias Schreiber about 9 years ago

  • Status changed from In Progress to Accepted
Actions #5

Updated by Benni Mack almost 9 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Actions #6

Updated by Susanne Moog almost 9 years ago

  • Sprint Focus changed from On Location Sprint to Remote Sprint
Actions #7

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #8

Updated by Benni Mack over 8 years ago

  • Target version deleted (7.5)
Actions #9

Updated by Susanne Moog about 5 years ago

  • Tracker changed from Bug to Task
Actions

Also available in: Atom PDF