http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692014-05-23T18:30:26ZTYPO3 ForgeTYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2181812014-05-23T18:30:26ZPhilipp Gampephilipp.gampe@typo3.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Accepted</i></li><li><strong>Complexity</strong> set to <i>medium</i></li><li><strong>Is Regression</strong> changed from <i>No</i> to <i>Yes</i></li></ul><p>I am not sure which commit introduced this, but it worked before.<br /><pre>
#1314085990: Desired storage is not in the list of available storages. (More information)
InvalidArgumentException thrown in file
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php in line 128.
15 TYPO3\CMS\Core\Resource\Driver\DriverRegistry::getDriverClass(NULL)
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/ResourceFactory.php:
00100: /** @var $driverRegistry Driver\DriverRegistry */
00101: $driverRegistry = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Driver\\DriverRegistry');
00102: $driverClass = $driverRegistry->getDriverClass($driverIdentificationString);
00103: $driverObject = GeneralUtility::makeInstance($driverClass, $driverConfiguration);
00104: return $driverObject;
14 TYPO3\CMS\Core\Resource\ResourceFactory::getDriverObject(NULL, array)
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/ResourceFactory.php:
00313: }
00314: $driverType = $storageRecord['driver'];
00315: $driverObject = $this->getDriverObject($driverType, $storageConfiguration);
00316: /** @var $storage ResourceStorage */
00317: $storage = GeneralUtility::makeInstance($className, $driverObject, $storageRecord);
13 TYPO3\CMS\Core\Resource\ResourceFactory::createStorageObject(array, NULL)
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/ResourceFactory.php:
00178: }
00179: if (!$storageObject instanceof ResourceStorage) {
00180: $storageObject = $this->createStorageObject($recordData, $storageConfiguration);
00181: }
00182: $this->signalSlotDispatcher->dispatch('TYPO3\\CMS\\Core\\Resource\\ResourceFactory', self::SIGNAL_PostProcessStorage, array($this, $storageObject));
12 TYPO3\CMS\Core\Resource\ResourceFactory::getStorageObject("6")
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/Service/UserStorageCapabilityService.php:
00052: // Makes sure the storage object can be retrieved which is not the case when new storage.
00053: if ((int)$propertyArray['row']['uid'] > 0) {
00054: $storage = ResourceFactory::getInstance()->getStorageObject($fileRecord['uid']);
00055: $storageRecord = $storage->getStorageRecord();
00056: $isPublic = $storage->isPublic();
11 TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService::renderIsPublic(array, TYPO3\CMS\Backend\Form\FormEngine)
10 call_user_func_array(array, array)
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
04241: }
04242: // Call method:
04243: $content = call_user_func_array(array(&$classObj, $parts[1]), array(&$params, &$ref));
04244: } else {
04245: $errorMsg = 'No method name \'' . $parts[1] . '\' in class ' . $parts[0];
9 TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction("typo3/sysext/core/Classes/Resource/Service/UserSto…rvice\UserStorageCapabilityService->renderIsPublic", array, TYPO3\CMS\Backend\Form\FormEngine)
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Form/FormEngine.php:
03231: $PA['parameters'] = isset($PA['fieldConf']['config']['parameters']) ? $PA['fieldConf']['config']['parameters'] : array();
03232: $PA['pObj'] = &$this;
03233: return GeneralUtility::callUserFunction($PA['fieldConf']['config']['userFunc'], $PA, $this);
03234: }
03235:
8 TYPO3\CMS\Backend\Form\FormEngine::getSingleField_typeUser("sys_file_storage", "is_public", array, array)
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Form/FormEngine.php:
01264: break;
01265: case 'user':
01266: $item = $this->getSingleField_typeUser($table, $field, $row, $PA);
01267: break;
01268: case 'flex':
7 TYPO3\CMS\Backend\Form\FormEngine::getSingleField_SW("sys_file_storage", "is_public", array, array)
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Form/FormEngine.php:
01128: }
01129: // Based on the type of the item, call a render function:
01130: $item = $this->getSingleField_SW($table, $field, $row, $PA);
01131: // Add language + diff
01132: if ($PA['fieldConf']['l10n_display'] && (GeneralUtility::inList($PA['fieldConf']['l10n_display'], 'hideDiff') || GeneralUtility::inList($PA['fieldConf']['l10n_display'], 'defaultAsReadonly'))) {
6 TYPO3\CMS\Backend\Form\FormEngine::getSingleField("sys_file_storage", "is_public", array, NULL, 1, "", NULL)
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Form/FormEngine.php:
03641: } elseif (!in_array($theField, $this->excludeElements) && $GLOBALS['TCA'][$table]['columns'][$theField]) {
03642: $this->palFieldArr[$palette][] = $theField;
03643: $elem = $this->getSingleField($table, $theField, $row, $fieldParts[1], 1, '', $fieldParts[2]);
03644: if (is_array($elem)) {
03645: $parts[] = $elem;
5 TYPO3\CMS\Backend\Form\FormEngine::loadPaletteElements("sys_file_storage", array, "capabilities", "")
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Form/FormEngine.php:
00971: }
00972: $out = '';
00973: $parts = $this->loadPaletteElements($table, $row, $palette, $itemList);
00974: // Put palette together if there are fields in it:
00975: if (count($parts)) {
4 TYPO3\CMS\Backend\Form\FormEngine::getPaletteFields("sys_file_storage", array, "capabilities", "Capabilities")
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Form/FormEngine.php:
00831: // Render a 'header' if not collapsed
00832: if ($GLOBALS['TCA'][$table]['palettes'][$parts[2]]['canNotCollapse'] && $parts[1]) {
00833: $out_array[$out_sheet][$out_pointer] .= $this->getPaletteFields($table, $row, $parts[2], $this->sL($parts[1]));
00834: } else {
00835: $out_array[$out_sheet][$out_pointer] .= $this->getPaletteFields($table, $row, $parts[2], '', '', $this->sL($parts[1]));
3 TYPO3\CMS\Backend\Form\FormEngine::getMainFields("sys_file_storage", array)
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
00904: }
00905: } else {
00906: $panel .= $this->tceforms->getMainFields($table, $rec);
00907: }
00908: $panel = $this->tceforms->wrapTotal($panel, $rec, $table);
2 TYPO3\CMS\Backend\Controller\EditDocumentController::makeEditForm()
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
00700: }
00701: // Creating the editing form, wrap it with buttons, document selector etc.
00702: $editForm = $this->makeEditForm();
00703: if ($editForm) {
00704: $this->firstEl = reset($this->elementsData);
1 TYPO3\CMS\Backend\Controller\EditDocumentController::main()
/home/phil/t3-playground/t3-git/typo3/alt_doc.php:
00051:
00052: $editDocumentController->init();
00053: $editDocumentController->main();
00054: $editDocumentController->printContent();
</pre></p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2182602014-05-25T16:34:58ZMarkus Kleinmarkus.klein@typo3.org
<ul></ul><p>Which version exactly?</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2182912014-05-26T08:20:35ZRico Sonntagrico.sonntag@netresearch.de
<ul></ul><p>6.2.1</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2183052014-05-26T11:26:28ZAlexander Opitzopitz.alexander@googlemail.com
<ul></ul><p>Verified with trunk</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2275582014-08-19T17:02:11ZRafal Brzeski
<ul></ul><p>Any progress with this issue or is there a solution for quick fix?</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2275622014-08-19T19:01:22ZMarkus Kleinmarkus.klein@typo3.org
<ul></ul><p>Still present in current master.<br />This is actually a tough thing.</p>
<p>The UserStorageCapabilityService is used to render the "ispublic" checkbox for the backend form.<br />The services tries to get the storage object by using the ResourceFactory, which again uses the StorageRepository.</p>
<p>The StorageRepository maintains an internal cache for the storages, which is loaded only once, but only contains the "enabled" storages.<br />Therefore the ResourceFactory fails to retrieve the storage object and tries to create a new one, which fails too and leads to the exception.</p>
<p>I see only one way to fix this: We need to modify the StorageRepository again to allow fetching of hidden records.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2275642014-08-19T19:21:24ZMarkus Kleinmarkus.klein@typo3.org
<ul><li><strong>Assignee</strong> set to <i>Frans Saris</i></li></ul><p>The culprit seems to be <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Outside storages can never be displayed as public (Closed)" href="http://forge.typo3.org/issues/56730">#56730</a>.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2275652014-08-19T19:24:00ZMarkus Kleinmarkus.klein@typo3.org
<ul></ul><p>Comment from me: I don't see the point, why a findByUid() call should consider enable-fields at all. IMO this is a bug in the AbstractRepository/StorageRepository.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2278322014-08-24T21:21:04ZFrans Sarisfranssaris@gmail.com
<ul></ul><p>Hi Rafal,</p>
<p>a probably quick fix could be to remove hidden from the sys_file_storage enablecolumns. But it disables the hide option for filestorages. This will probably also be part of the real fix.</p>
<p>Add following to you ext_tables.php</p>
<pre>
$GLOBALS['TCA']['sys_file_storage']['ctrl']['enablecolumns'] = array();
</pre> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477072015-01-30T18:02:58ZFrans Sarisfranssaris@gmail.com
<ul><li><strong>Status</strong> changed from <i>Accepted</i> to <i>New</i></li><li><strong>Complexity</strong> changed from <i>medium</i> to <i>no-brainer</i></li><li><strong>Sprint Focus</strong> set to <i>On Location Sprint</i></li></ul> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477102015-01-30T18:04:08ZFrans Sarisfranssaris@gmail.com
<ul></ul><p>Fix should be to disable to possibility to hide a filestorage. See last comment</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477422015-01-30T19:02:04ZGerrit Code Review
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Under Review</i></li></ul><p>Patch set 1 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/36461">http://review.typo3.org/36461</a></p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477482015-01-30T19:19:42ZGerrit Code Review
<ul></ul><p>Patch set 2 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/36461">http://review.typo3.org/36461</a></p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477622015-01-30T19:49:43ZGerrit Code Review
<ul></ul><p>Patch set 3 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/36461">http://review.typo3.org/36461</a></p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477652015-01-30T20:01:24ZGerrit Code Review
<ul></ul><p>Patch set 4 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/36461">http://review.typo3.org/36461</a></p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477742015-01-30T20:30:13ZRuud Silvrantsruudsilvrants@gmail.com
<ul><li><strong>Status</strong> changed from <i>Under Review</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[BUGFIX] Disable functionality to hide file storage Disables the functionality to hide a file st..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/cb67cd42d04af3b2380fdb8f0daf5ad76c8807b0">cb67cd42d04af3b2380fdb8f0daf5ad76c8807b0</a>.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477842015-01-30T21:07:50ZGerrit Code Review
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Under Review</i></li></ul><p>Patch set 1 for branch <strong>master</strong> of project <strong>Packages/TYPO3.CMS</strong> has been pushed to the review server.<br />It is available at <a class="external" href="http://review.typo3.org/36474">http://review.typo3.org/36474</a></p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2477972015-01-30T22:00:12ZHelmut Hummeltypo3@helhum.io
<ul><li><strong>Status</strong> changed from <i>Under Review</i> to <i>Resolved</i></li></ul><p>Applied in changeset <a class="changeset" title="[FOLLOWUP] Disable functionality to hide file storage Also remove an obsolete sql key and remain..." href="http://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/b637a4e608220a49caade2c86e0b935d9bc83810">b637a4e608220a49caade2c86e0b935d9bc83810</a>.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2603062015-06-03T12:11:38ZViktor Livakivskyiinvisible.kinder@gmail.com
<ul></ul><p>Will this fix be backported to 6.2 branch?<br />Under 6.2.12 still reproduced.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2603112015-06-03T12:58:06ZHelmut Hummeltypo3@helhum.io
<ul></ul><p>Viktor Livakivskyi wrote:</p>
<blockquote>
<p>Will this fix be backported to 6.2 branch?<br />Under 6.2.12 still reproduced.</p>
</blockquote>
<p>File storages are admin only data records.<br />The fix is to remove the possibility to disable a file storage.<br />For 6.2, you may educate your admins to just not disable a file storage record and you will be fine.</p>
<p>If you ask me, there is no need to backport this to 6.2</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2603282015-06-03T15:23:17ZViktor Livakivskyiinvisible.kinder@gmail.com
<ul></ul><p>Yes, sure - I can even override TCA to exclude possibility to hide the storage.</p> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=2923682016-01-08T11:16:24ZAnja Leichsenring
<ul><li><strong>Sprint Focus</strong> deleted (<del><i>On Location Sprint</i></del>)</li></ul> TYPO3 Core - Bug #59017: Exception while trying to edit disabled file storagehttp://forge.typo3.org/issues/59017?journal_id=3827782018-10-02T11:55:54ZBenni Mackbenni@typo3.org
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul>