suggest wizard does not work properly with TCA fields of type "select"
Also the pending documentation claims that the new suggest wizard is working nicely with group and select fields, it's not the case for select fields for two reasons:
a) 'foreign_table' is not taken into account for the search, only 'allowed' which is not present in select field configurations by default
b) once a) is fixed, the JS part of the suggest box is handling the search results wrong because the ID values of the generated option fields always have the tablename prepended as it's needed for group fields, but not select fields
The attached patch has as first step a patch for a). I didn't have a closer look at the JS part yet - maybe if one who knows what to do could provide a patch for the JS? Thanks.
The attatched patch is also introducing a new configuration option for the wizard, that allows to define additional search fields in which the wizard should search in.
(issue imported from #M13172)
[BUGFIX] Get suggest wizard working with renderMode=checkbox
In case a select field with renderMode "checkbox" is used together with
the suggest wizard, clicking the suggestions will not check the
related item in the list and therefore the wizard isn't useful anyhow
in that combination.
Releases: 6.2, 6.1, 6.0
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
#11 Updated by Markus Klein over 6 years ago
- Is Regression set to No
How to test¶
create the typo3conf/extTables.php file and add this content:
<?php $GLOBALS['TCA']['be_groups']['columns']['subgroup']['config']['renderMode'] = 'checkbox'; $GLOBALS['TCA']['be_groups']['columns']['subgroup']['config']['wizards']['suggest'] = array('type' => 'suggest');
Clear All Cache
If you don't have a BE user group, add one.
Save and close
Create another BE user group. See the groups listed in the subgroups field. They all have a checkbox in front now.
Search for one of the groups in the wizard and select it there.
The item in the list should now be checked.