Project

General

Profile

Actions

Feature #81976

closed

TCA wizards don't show up for `selectSingle` fields

Added by Paul Ilea over 7 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Start date:
2017-07-26
Due date:
% Done:

100%

Estimated time:
PHP Version:
7.1
Tags:
Complexity:
easy
Sprint Focus:

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

SelectSingleElement.php (11.6 KB) SelectSingleElement.php Philipp Dettling, 2017-08-25 17:28

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #89032: TCA SelectSingleElement does not render fieldControlClosed2019-08-28

Actions
Actions #1

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
Actions #2

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,
        ],
    ],
]
Actions #3

Updated by Philipp Dettling about 7 years ago

  • File deleted (SelectSingleElement.php)
Actions #4

Updated by Philipp Dettling about 7 years ago

There were some parts of the "suggest"-wizard left, sorry for that.
I removed them in the attached file.

Actions #5

Updated by Philipp Dettling about 7 years ago

  • Target version set to next-patchlevel
  • % Done changed from 80 to 100
  • Complexity set to easy
Actions #6

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

Actions #7

Updated by Kevin Ditscheid almost 6 years ago

Isn't this a feature request and should be targeted for a major release (TYPO3 10)?

Actions #8

Updated by Susanne Moog over 5 years ago

  • Tracker changed from Bug to Feature
Actions #9

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

Actions #10

Updated by Benni Mack over 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #11

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

Actions #12

Updated by Daniel Goerz about 5 years ago

  • Related to Bug #89032: TCA SelectSingleElement does not render fieldControl added
Actions #13

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

Actions #14

Updated by Mathias Brodala almost 5 years ago

  • Related to deleted (Bug #89032: TCA SelectSingleElement does not render fieldControl)
Actions #15

Updated by Mathias Brodala almost 5 years ago

  • Has duplicate Bug #89032: TCA SelectSingleElement does not render fieldControl added
Actions #16

Updated by Susanne Moog almost 5 years ago

  • Status changed from Under Review to Closed

Closing in favor of #89032

Actions

Also available in: Atom PDF