#76958displayCond LOADED does not check the loaded extension
Description
In TYPO3 7.6.6 the TCA does not check the displayCond if an extension has been installed. Then it raises a #1444996537 TYPO3 exception.
The TCA column is:
'gained_voucher' => array (
'exclude' => 1,
'displayCond' => 'EXT:voucher:LOADED:true',
'label' => 'LLL:EXT:' . TT_PRODUCTS_EXT . '/locallang_db.xml:sys_products_orders.gained_voucher',
'config' => array (
'type' => 'inline',
'appearance' => array ('collapseAll' => TRUE, 'newRecordLinkAddTitle' => TRUE, 'useCombination' => TRUE),
'foreign_table' => 'sys_products_orders_mm_gained_voucher_codes',
'foreign_field' => 'uid_local',
'foreign_sortby' => 'sorting',
'foreign_label' => 'uid_foreign',
'foreign_selector' => 'uid_foreign',
'foreign_unique' => 'uid_foreign',
'maxitems' => 100
),
),
The TCA of sys_products_orders_mm_gained_voucher_codes is dependant on the extension voucher, which is not installed in this case.
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('voucher')) {
// ******************************************************************
// order to voucher codes table, sys_products_orders_mm_gained_voucher_codes
// ******************************************************************
$result = array (
'ctrl' => array (
'title' => 'LLL:EXT:' . TT_PRODUCTS_EXT . '/locallang_db.xml:sys_products_orders_mm_gained_voucher_codes',
'label' => 'uid_local',
'tstamp' => 'tstamp',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden'
),
—————————————-
Uncaught TYPO3 Exception
#1444996537: Table sys_products_orders field gained_voucher points in foreign_selector or foreign_unique to field uid_foreign of table sys_products_orders_mm_gained_voucher_codes, but this field is either not defined or is not of type select or group (More information)
UnexpectedValueException thrown in file
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInlineConfiguration.php in line 242.
15 TYPO3\CMS\Backend\Form\FormDataProvider\TcaInlineConfiguration::addInlineSelectorAndUniqueConfiguration(array, "gained_voucher")
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInlineConfiguration.php:
00049: $result = $this->initializeLocalizationMode($result, $fieldName);
00050: $result = $this->initializeAppearance($result, $fieldName);
00051: $result = $this->addInlineSelectorAndUniqueConfiguration($result, $fieldName);
00052: }
00053: return $result;
14 TYPO3\CMS\Backend\Form\FormDataProvider\TcaInlineConfiguration::addData(array)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Form/FormDataGroup/TcaDatabaseRecord.php:
00049: }
00050:
00051: $result = $provider->addData($result);
00052: }
00053:
13 TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord::compile(array)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Form/FormDataCompiler.php:
00097: $resultKeysBeforeFormDataGroup = array_keys($result);
00098:
00099: $result = $this->formDataGroup->compile($result);
00100:
00101: if (!is_array($result)) {
12 TYPO3\CMS\Backend\Form\FormDataCompiler::compile(array)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
01109: }
01110:
01111: $formData = $formDataCompiler->compile($formDataCompilerInput);
01112:
01113: // Set this->viewId if possible
11 TYPO3\CMS\Backend\Controller\EditDocumentController::makeEditForm()
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
01000: }
01001: // Creating the editing form, wrap it with buttons, document selector etc.
01002: $editForm = $this->makeEditForm();
01003: if ($editForm) {
01004: $this->firstEl = reset($this->elementsData);
10 TYPO3\CMS\Backend\Controller\EditDocumentController::main()
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:
02018:
02019: $this->init();
02020: $this->main();
02021:
02022: $response->getBody()->write($this->moduleTemplate->renderContent());
9 TYPO3\CMS\Backend\Controller\EditDocumentController::mainAction(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)
8 call_user_func_array(array, array)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Http/RouteDispatcher.php:
00052: $targetIdentifier = $route->getOption('target');
00053: $target = $this->getCallableFromTarget($targetIdentifier);
00054: return call_user_func_array($target, array($request, $response));
00055: }
00056:
7 TYPO3\CMS\Backend\Http\RouteDispatcher::dispatch(TYPO3\CMS\Core\Http\ServerRequest, TYPO3\CMS\Core\Http\Response)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Http/RequestHandler.php:
00159: /** @var RouteDispatcher $dispatcher */
00160: $dispatcher = GeneralUtility::makeInstance(RouteDispatcher::class);
00161: return $dispatcher->dispatch($request, $response);
00162: }
00163: }
6 TYPO3\CMS\Backend\Http\RequestHandler::dispatch(TYPO3\CMS\Core\Http\ServerRequest)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Http/RequestHandler.php:
00092: // Check if the router has the available route and dispatch.
00093: if ($routingEnabled) {
00094: return $this->dispatch($request);
00095: }
00096:
5 TYPO3\CMS\Backend\Http\RequestHandler::handleRequest(TYPO3\CMS\Core\Http\ServerRequest)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/core/Classes/Core/Bootstrap.php:
00300:
00301: // Execute the command which returns a Response object or NULL
00302: $this->response = $requestHandler->handleRequest($request);
00303: return $this;
00304: }
4 TYPO3\CMS\Core\Core\Bootstrap::handleRequest(TYPO3\CMS\Core\Http\ServerRequest)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/sysext/backend/Classes/Http/Application.php:
00092: }
00093:
00094: $this->bootstrap->handleRequest($this->request);
00095:
00096: if ($execute !== null) {
3 TYPO3\CMS\Backend\Http\Application::run()
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/index.php:
00018: call_user_func(function () {
00019: $classLoader = require __DIR__ . '/../vendor/autoload.php';
00020: (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();
00021: });
2 {closure}()
1 call_user_func(Closure)
/home/mywebsite/public_html/mywebsite/typo3_src-7.6.6/typo3/index.php:
00019: $classLoader = require __DIR__ . '/../vendor/autoload.php';
00020: (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run();
00021: });Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.