Bug #56427

FAL driver configuration: No configured flexform results in error

Added by Rico Sonntag almost 6 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2014-02-28
Due date:
% Done:

0%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The FAL driver configuration allows an optional flexform to be specified.

/typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php

public function registerDriverClass($className, $shortName = NULL, $label = NULL, $flexFormDataStructurePathAndFilename = NULL) {
    ...
}

The configuration screen displays the error Data Structure ERROR: Line 1: Invalid document end if no flexform is given, if the driver need none.

ext_localconf.php

/* @var \TYPO3\CMS\Core\Resource\Driver\DriverRegistry $registry */
$registry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
    'TYPO3\CMS\Core\Resource\Driver\DriverRegistry'
);

$registry->registerDriverClass(
    'DriverClass',
    'Shortname',  
    'Label'       
);

History

#1 Updated by Rico Sonntag almost 6 years ago

If no flexform configuration is given the FormEngine.php reverts to an "default" source pointer which does not exists in the DriverRegistry.

#2 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27937

#3 Updated by Gerrit Code Review almost 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27937

#4 Updated by Gerrit Code Review almost 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27937

#5 Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27937

#6 Updated by Gerrit Code Review almost 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27937

#7 Updated by Benni Mack over 4 years ago

  • Status changed from Under Review to Rejected

This change does not solve the problem, so the solution here is that the Driver should add a Display Condition that if FIELD:driver:=:MyDriver the Configuration should not show up. We won't change FlexForm logic for this edge case.

#8 Updated by Christian Weiske over 4 years ago

We hide the configuration now with the following code in Configuration/TCA/Overrides/sys_file_storage.php:

<?php
//disable driver configuration, workaround for
// https://forge.typo3.org/issues/56427
// Bug #56427: FAL driver configuration:
//             No configured flexform results in error
$GLOBALS['TCA']['sys_file_storage']['columns']['configuration']
    ['displayCond']['AND'][] = 'FIELD:driver:!=:DAM';
?>

Also available in: Atom PDF