Project

General

Profile

Actions

Bug #71622

closed

TCA type=select does not render select field

Added by Kevin Ditscheid about 9 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-11-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When I want to render a normal select field via TCA, I just get the message "Unknown type: select".
With TYPO3 7.5 a TCA configuration like this:

'header_icon_position' => array(
'exclude' => 1,
'label' => 'LLL:EXT:ep_template_hhdl/Resources/Private/Language/locallang.xlf:tt_content.header_icon_position',
'config' => array(
'type' => 'select',
'items' => array(
array(
'',
''
),
array(
'LLL:EXT:ep_template_hhdl/Resources/Private/Language/locallang.xlf:tt_content.header_icon_position.left',
'left'
),
array(
'LLL:EXT:ep_template_hhdl/Resources/Private/Language/locallang.xlf:tt_content.header_icon_position.right',
'right'
)
)
)
),

has rendered a normal select field. With TYPO3 7.6 this isn't the case anymore.
If i define the rederType manually, it will work again, but the documentation doesn't mention, that the renderType is mandatory, now.
https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#rendertype

Besides that, if i do the TCA with foreign_table, the renderType is processed automatically.
This seems a lot like a bug, because the default renderType should be selectSingleBox like it was before TYPO3 7.6.

Running on TYPO3 7.6.0 and TYPO3 7.6.1-dev with PHP 5.5.

Actions #1

Updated by Henrik Ziegenhain about 9 years ago

Maybe this is already resolved in current master?
https://forge.typo3.org/issues/71346

Actions #2

Updated by Wouter Wolters about 9 years ago

  • Status changed from New to Needs Feedback

Can you please enable your deprecation log and check what is written in there?

There is a TCA migration taken place in the core that should report this kind of issues.

Actions #3

Updated by Christian Kuhn about 9 years ago

renderType for select types IS mandatory. documentation will be adapted in this regard.

Actions #4

Updated by Kevin Ditscheid about 9 years ago

Christian Kuhn wrote:

renderType for select types IS mandatory. documentation will be adapted in this regard.

Thanks, then this Ticket can be closed.
Maybe someone will add a ticket for the documentation?

Actions #5

Updated by Dirk Jüttner about 9 years ago

Sorry, but I dont think it can be closed. For me the error is the same (TYPO3 7.6.0, PHP 5.6.10). No problem in TYPO3 6.2.

Errormessage in the BE is:
Unknown type: select

Part of TCA is:
$GLOBALS['TCA']['tx_productselection_domain_model_product'] = array(
(...)
'columns' => array(
(...)
'category' => array(
'exclude' => 1,
'label' => 'LLL:EXT:productselection/Resources/Private/Language/locallang_db.xlf:tx_productselection_domain_model_product.category',
'config' => array(
'type' => 'select',
'items' => array(
array('cat0', 0),
array('cat1', 1),
array('cat2', 2),
array('cat3', 3),
array('cat4', 4),
),
'size' => 1,
'maxitems' => 1,
'eval' => 'required'
),
),
(...)

deprecation.log:
20-11-15 03:23: TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles() - since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Table definition should be moved to <your_extension>/Configuration/TCA/<table_name> - call_user_func#21 // {closure}# // TYPO3\CMS\Backend\Http\Application->run#20 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#94 // TYPO3\CMS\Backend\Http\AjaxRequestHandler->handleRequest#302 // TYPO3\CMS\Backend\Http\AjaxRequestHandler->boot#85 // TYPO3\CMS\Core\Core\Bootstrap->loadExtensionTables#142 // TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtTables#972 // TYPO3\CMS\Core\Cache\Frontend\PhpFrontend->requireOnce#1863 // TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend->requireOnce#77 // require_once(typo3temp/Cache/Code/cache_core/ext_tables_cbd8771543c081b4b10f529444b0bf37f1b091bb.php),rc-7.6.0/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php#382 // TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadNewTcaColumnsConfigFiles#2057 // TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction#1972 (rc-7.6.0/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php#1964)

Nothing in the php_error.log

Actions #6

Updated by Philipp Gollmer about 9 years ago

You don´t have a renderType.

You will need this in 7.6 as Christian Kuhn wrote, it´s mandatory.

f.e.:
'type' => 'select',
'renderType' => 'selectSingleBox'

Actions #7

Updated by Dirk Jüttner about 9 years ago

Thx a lot, thats it.

Actions #8

Updated by Julian Hofmann almost 9 years ago

It depends on the way of registering new TCA entries:
- via ext_tables.php and dynamicConfigfile renderType is mandadory
- via Configuration/TCA/tabelname.php including TCA via 'return array(...)' renderType is not mandatory

Actions #9

Updated by Wouter Wolters almost 9 years ago

  • Status changed from Needs Feedback to Closed
Actions #10

Updated by Robert Gonda over 8 years ago

Julian Hofmann wrote:
- via Configuration/TCA/tabelname.php including TCA via 'return array(...)' renderType is not mandatory

This is not true.
I have Typo3 7.6.4 with configuration in Configuration/TCA/...php, but the problem is repeated - "Unknown type: select".

Actions #11

Updated by Andreas Krämer over 8 years ago

I can also reproduce this "error" (7.6.4). In the documentation examples the rednerType is also missing and therefore assumed to be not mandatory:
https://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#filefolder

Also the message "Unknown type: select" ist misleading.

Actions #12

Updated by Willi Martens over 8 years ago

Get the same notice "Unknown type: select" in 7.6.10:

'config' => array(
    'type' => 'select',
    'items' => array(
        array('LLL:EXT:...', 0),
        array('LLL:EXT:...', 1),
        array('LLL:EXT:...', 2),
    ),
    'size' => 1,
    'maxitems' => 1,
    'eval' => ''
),
Actions #13

Updated by Daniel Ostmann almost 8 years ago

Be sure to define the right renderType. I had the same issue due to a typo in renderType:

'renderType' => 'selectCheckbox',

instead of the correct value:

'renderType' => 'selectCheckBox'
Actions

Also available in: Atom PDF