Bug #21924

suggest wizard does not work properly with TCA fields of type "select"

Added by Franz Koch almost 10 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2010-01-07
Due date:
% Done:

100%

TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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)

suggest-wizard-selectFields.diff View (1.85 KB) Administrator Admin, 2010-01-07 19:05

suggest-wizard-selectFields_v2.diff View (4.63 KB) Administrator Admin, 2010-01-07 19:46

patch_4-6.patch View (5.92 KB) Tolleiv Nietsch, 2012-05-02 15:04


Related issues

Related to TYPO3 Core - Feature #17874: Add suggest-like feature to TCEforms Closed 2007-12-02

Associated revisions

Revision b427ae10 (diff)
Added by Tolleiv Nietsch almost 6 years ago

[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.

Fixes: #21924
Releases: 6.2, 6.1, 6.0
Change-Id: I5823197e9f6bb3f3d4ffc4032677478bd18d87f3
Reviewed-on: https://review.typo3.org/18689
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

History

#1 Updated by Franz Koch almost 10 years ago

added final patch including changes in JS.

#2 Updated by Tolleiv Nietsch over 7 years ago

  • Status changed from New to Accepted
  • Assignee set to Tolleiv Nietsch
  • Target version changed from 0 to 4.7.1

Let's see if I can help with this one.

#3 Updated by Tolleiv Nietsch over 7 years ago

Working version for 4-6 - going to take care of master in the next days.

#4 Updated by Gerrit Code Review over 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10931

#5 Updated by Gerrit Code Review almost 7 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18689

#6 Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18689

#7 Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18689

#8 Updated by Gerrit Code Review about 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/18689

#9 Updated by Gerrit Code Review almost 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/18689

#10 Updated by Gerrit Code Review almost 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/18689

#11 Updated by Markus Klein almost 6 years ago

  • Is Regression set to No

How to test

Step 1
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');

Step 2
Clear All Cache

Step 3
If you don't have a BE user group, add one.
Save and close

Step 4
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.

#12 Updated by Tolleiv Nietsch almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#13 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF