Feature #81976
closedTCA wizards don't show up for `selectSingle` fields
100%
Description
I've tried adding simple add/edit/suggest wizards to some `select` type fields and noticed that, for renderType = 'selectSingle' , they were not displayed while for renderType = 'selectMultipleSideBySide', they worked as expected. I'm including a TCA field configuration example I've used to test the issue:
```
'user' => [
'exclude' => 0,
'label' => 'User',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'minitems' => 0,
'foreign_table' => 'fe_users',
'foreign_table_where' => 'ORDER BY fe_users.name',
'items' => [
['', 0],
],
'wizards' => [
'edit' => [
'type' => 'popup',
'title' => 'Edit',
'module' => [
'name' => 'wizard_edit',
],
'params' => [
'table' => 'fe_users'
],
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=850,width=960,status=0,menubar=0,scrollbars=1'
],
],
],
],
```
Files
Updated by Paul Ilea over 7 years ago
- Subject changed from TCA wizards don't show up for `selectSingle` to TCA wizards don't show up for `selectSingle` fields
Updated by Philipp Dettling about 7 years ago
- File SelectSingleElement.php added
- % Done changed from 0 to 80
Paul Ilea wrote:
I've tried adding simple add/edit/suggest wizards to some `select` type fields and noticed that, for renderType = 'selectSingle' , they were not displayed while for renderType = 'selectMultipleSideBySide', they worked as expected. I'm including a TCA field configuration example
I can confirm that, just tried the same.
Unfortunately only the "fieldWizard" is used in \TYPO3\CMS\Backend\Form\Element\SelectSingleElement, but not the "fieldControl", which would contain the wizard-links:
$legacyWizards = $this->renderWizards();
$legacyFieldWizardHtml = implode(LF, $legacyWizards['fieldWizard']);
// this is currently missing:
$legacyFieldControlHtml = implode(LF, $legacyWizards['fieldControl']);
I fixed this in the appended file, with this you could use the following code to set the wizard-buttons (the old 'wizards'-style is deprecated):
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_extension_domain_model_model',
'minitems' => 1,
'fieldControl' => [
'editPopup' => [
'disabled' => false,
],
'addRecord' => [
'disabled' => false,
],
'listModule' => [
'disabled' => true,
],
],
]
Updated by Philipp Dettling about 7 years ago
- File deleted (
SelectSingleElement.php)
Updated by Philipp Dettling about 7 years ago
- File SelectSingleElement.php SelectSingleElement.php added
There were some parts of the "suggest"-wizard left, sorry for that.
I removed them in the attached file.
Updated by Philipp Dettling about 7 years ago
- Target version set to next-patchlevel
- % Done changed from 80 to 100
- Complexity set to easy
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/59651
Updated by Kevin Ditscheid almost 6 years ago
Isn't this a feature request and should be targeted for a major release (TYPO3 10)?
Updated by Ayke Halder over 5 years ago
This feature was still working in TYPO3 7, but is not working in TYPO3 8 anymore. So this is a deprecation, isn't it?
#79440
https://docs.typo3.org/typo3cms/extensions/core/Changelog/8.6/Deprecation-79440-TcaChanges.html
Updated by Benni Mack over 5 years ago
- Target version changed from next-patchlevel to Candidate for patchlevel
Updated by Gerrit Code Review about 5 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/c/Packages/TYPO3.CMS/+/59651
Updated by Daniel Goerz about 5 years ago
- Related to Bug #89032: TCA SelectSingleElement does not render fieldControl added
Updated by Gerrit Code Review almost 5 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/c/Packages/TYPO3.CMS/+/59651
Updated by Mathias Brodala almost 5 years ago
- Related to deleted (Bug #89032: TCA SelectSingleElement does not render fieldControl)
Updated by Mathias Brodala almost 5 years ago
- Has duplicate Bug #89032: TCA SelectSingleElement does not render fieldControl added
Updated by Susanne Moog almost 5 years ago
- Status changed from Under Review to Closed
Closing in favor of #89032