Project

General

Profile

Actions

Bug #42873

closed

Problem with special character in files and folders

Added by Marcos Fadul about 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2012-11-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

äöüß produce errors in Fileadmin. The user can create a file with the name über_uns, but then problems bei displaing the file list appear.

FAL should be able to work with this special characters in filenames.

UTF-8 is configure as default for DB, apache, php and locales.

To reproduce the error, just create a folder or a file with the name über_uns.

Some more information:

Uncaught TYPO3 Exception
#1314349666: Cannot list items in directory /ber_uns/ - does not exist or is no directory (More information)

InvalidArgumentException thrown in file
/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php in line 297.

18 TYPO3\CMS\Core\Resource\Driver\LocalDriver::getDirectoryItemList("/ber_uns/", 0, 0, array, "getFolderList_itemCallback")

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php:
00616: */
00617: public function getFolderList($path, $start = 0, $numberOfItems = 0, array $foldernameFilterCallbacks = array()) {
00618: return $this->getDirectoryItemList($path, $start, $numberOfItems, $foldernameFilterCallbacks, $this->folderListCallbackMethod);
00619: }
00620:

17 TYPO3\CMS\Core\Resource\Driver\AbstractDriver::getFolderList("/ber_uns/", 0, 0, array)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/ResourceStorage.php:
01485: */
01486: public function fetchFolderListFromDriver($path, $start = 0, $numberOfItems = 0, array $folderFilterCallbacks = array()) {
01487: $items = $this->driver->getFolderList($path, $start, $numberOfItems, $folderFilterCallbacks);
01488: // Exclude the processed folder, so it won't get indexed etc
01489: $processingFolder = $this->getProcessingFolder();

16 TYPO3\CMS\Core\Resource\ResourceStorage::fetchFolderListFromDriver("/ber_uns/", 0, 0, array)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/ResourceStorage.php:
01474: public function getFolderList($path, $start = 0, $numberOfItems = 0, $useFilters = TRUE) {
01475: $filters = $useFilters === TRUE ? $this->fileAndFolderNameFilters : array();
01476: return $this->fetchFolderListFromDriver($path, $start, $numberOfItems, $filters);
01477: }
01478:

15 TYPO3\CMS\Core\Resource\ResourceStorage::getFolderList("/ber_uns/", 0, 0, boolean)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Folder.php:
00247:
00248: $folderObjects = array();
00249: $folderArray = $this->storage->getFolderList($this->identifier, $start, $numberOfItems, $useFilters);
00250: if (count($folderArray) > 0) {
00251: /** @var $factory \TYPO3\CMS\Core\Resource\ResourceFactory */

14 TYPO3\CMS\Core\Resource\Folder::getSubfolders()

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php:
00088: }
00089: $allFolderItems = array($parentFolder);
00090: $subFolders = $parentFolder->getSubfolders();
00091: foreach ($subFolders as $subFolder) {
00092: $subFolderItems = $this->getSubfoldersForOptionList($subFolder, $level);

13 TYPO3\CMS\Core\Resource\Service\UserFileMountService::getSubfoldersForOptionList(TYPO3\CMS\Core\Resource\Folder, 2)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php:
00090: $subFolders = $parentFolder->getSubfolders();
00091: foreach ($subFolders as $subFolder) {
00092: $subFolderItems = $this->getSubfoldersForOptionList($subFolder, $level);
00093: $allFolderItems = array_merge($allFolderItems, $subFolderItems);
00094: }

12 TYPO3\CMS\Core\Resource\Service\UserFileMountService::getSubfoldersForOptionList(TYPO3\CMS\Core\Resource\Folder, 1)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php:
00090: $subFolders = $parentFolder->getSubfolders();
00091: foreach ($subFolders as $subFolder) {
00092: $subFolderItems = $this->getSubfoldersForOptionList($subFolder, $level);
00093: $allFolderItems = array_merge($allFolderItems, $subFolderItems);
00094: }

11 TYPO3\CMS\Core\Resource\Service\UserFileMountService::getSubfoldersForOptionList(TYPO3\CMS\Core\Resource\Folder)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php:
00061: $storage = $storageRepository->findByUid($storageUid);
00062: $rootLevelFolder = $storage->getRootLevelFolder();
00063: $folderItems = $this->getSubfoldersForOptionList($rootLevelFolder);
00064: foreach ($folderItems as $item) {
00065: $PA['items'][] = array(

10 TYPO3\CMS\Core\Resource\Service\UserFileMountService::renderTceformsSelectDropdown(array, TYPO3\CMS\Backend\Form\FormEngine)
9 call_user_func_array(array, array)

/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
04017: }
04018: // Call method:
04019: $content = call_user_func_array(array(&$classObj, $parts1), array(&$params, &$ref));
04020: } else {
04021: $errorMsg = 'No method name \'' . $parts1 . '\' in class ' . $parts0;

8 TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction("typo3/sysext/core/Classes/Resource/Service/UserFil…UserFileMountService->renderTceformsSelectDropdown", array, TYPO3\CMS\Backend\Form\FormEngine)

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Form/FormEngine.php:
04507: $params['row'] = $row;
04508: $params['field'] = $field;
04509: \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($config['itemsProcFunc'], $params, $this);
04510: return $items;
04511: }

7 TYPO3\CMS\Backend\Form\FormEngine::procItems(array, NULL, array, "sys_filemounts", array, "path")

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Form/FormEngine.php:
01695: // Process items by a user function:
01696: if (isset($config['itemsProcFunc']) && $config['itemsProcFunc']) {
01697: $selItems = $this->procItems($selItems, $PA['fieldTSConfig']['itemsProcFunc.'], $config, $table, $row, $field);
01698: }
01699: // Possibly remove some items:

6 TYPO3\CMS\Backend\Form\FormEngine::getSingleField_typeSelect("sys_filemounts", "path", array, array)

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Form/FormEngine.php:
01183: break;
01184: case 'select':
01185: $item = $this->getSingleField_typeSelect($table, $field, $row, $PA);
01186: break;
01187: case 'group':

5 TYPO3\CMS\Backend\Form\FormEngine::getSingleField_SW("sys_filemounts", "path", array, array)

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Form/FormEngine.php:
01085: }
01086: // Based on the type of the item, call a render function:
01087: $item = $this->getSingleField_SW($table, $field, $row, $PA);
01088: // Add language + diff
01089: if ($PA['fieldConf']['l10n_display'] && (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($PA['fieldConf']['l10n_display'], 'hideDiff') || \TYPO3\CMS\Core\Utility\GeneralUtility::inList($PA['fieldConf']['l10n_display'], 'defaultAsReadonly'))) {

4 TYPO3\CMS\Backend\Form\FormEngine::getSingleField("sys_filemounts", "path", array, NULL, 0, NULL, NULL)

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Form/FormEngine.php:
00779: $this->palettesRendered[$this->renderDepth][$table][$parts2] = 1;
00780: }
00781: $sField = $this->getSingleField($table, $theField, $row, $parts1, 0, $parts3, $parts2);
00782: if ($sField) {
00783: $sField .= $sFieldPal;

3 TYPO3\CMS\Backend\Form\FormEngine::getMainFields("sys_filemounts", array)

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
00832: }
00833: } else {
00834: $panel .= $this->tceforms->getMainFields($table, $rec);
00835: }
00836: $panel = $this->tceforms->wrapTotal($panel, $rec, $table);

2 TYPO3\CMS\Backend\Controller\EditDocumentController::makeEditForm()

/var/www/share/typo3_src-6.0/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
00627: }
00628: // Creating the editing form, wrap it with buttons, document selector etc.
00629: $editForm = $this->makeEditForm();
00630: if ($editForm) {
00631: $this->firstEl = reset($this->elementsData);

1 TYPO3\CMS\Backend\Controller\EditDocumentController::main()

/var/www/share/typo3_src-6.0/typo3/alt_doc.php:
00057: // Main:
00058: $SOBE->init();
00059: $SOBE->main();
00060: $SOBE->printContent();
00061: ?>


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #42933: Problem with special character in files and foldersClosed2012-11-12

Actions
Actions #1

Updated by Marcos Fadul about 12 years ago

  • Project changed from 1401 to TYPO3 Core
  • Target version deleted (6.0 final)
Actions #2

Updated by Patrick Broens about 12 years ago

  • Category set to File Abstraction Layer (FAL)
  • Complexity set to medium
  • TYPO3 Version set to 6.0
Actions #3

Updated by Gerrit Code Review almost 12 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17465

Actions #4

Updated by Gerrit Code Review almost 12 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17487

Actions #5

Updated by Christian Weiske almost 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF