Issue Feature Closed

#75017Search for relations in backend

Markus Hölzle 03/11/16, 12:29 updated 11/12/26, 19:24

Description

Hey there,

I’ve got a feature request for the TYPO3 backend list module: Search for relations.

An example:
I’ve got two tables: “car” and “manufacturer”.
Every “car” has a relation to the “manufacturer” (every car has one or more “manufacturer” for example).
Now, the backend user wants to list all cars from the manufacturer “VW” for example and search for “VW”.

-> This does not work until now
(This is a really unexpected and strange behaviour for the users…)

The reason is: the TYPO3 backend searches only in the table “car”, in fields with the TCA config type “text”, “flex” and “input” (see \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList::makeSearchString).

What do you think? Should there a feature like this? Will this feature be added to the core if I contribute it?

Regards,
Markus

Reviews 1

History 1720

  1. Markus Hölzle commented <span data-processor="relativetime" data-value="2016-05-22T19:52:38+00:00" > 05/22/16, 19:52 </span>

    This part of the core should be migrated to doctrine before we can implement this feature (to avoid implementing this twice).
    See #76259

  2. Benno Flory commented <span data-processor="relativetime" data-value="2016-06-22T11:01:55+00:00" > 06/22/16, 11:01 </span>

    We have the same requirement from current customers, e.g. orders <-> customers. Would be great to implement that asap…
    If we want a workaround now, we would have to implement a custom backend module, right?

  3. Gerrit Code Review pushed patch set 1 for master to change 49341 status New Under Review <span data-processor="relativetime" data-value="2016-08-03T12:46:57+00:00" > 08/03/16, 12:46 </span>

  4. Susanne Moog commented and changed status Under Review New <span data-processor="relativetime" data-value="2019-03-01T18:59:19+00:00" > 03/01/19, 18:59 </span>

    Review was abandoned.

  5. Jan Kornblum commented <span data-processor="relativetime" data-value="2024-05-28T11:37:42+00:00" > 05/28/24, 11:37 </span>

    I think this still would be an important improvement! Especially if implementation also would optimize TCA “select” fields (selectMultipleSideBySide), to be able to filter items by their relations. I currently have to deal with ~30.000 “event” records which have <n:1> relations to “seminar” and “location”. Due to the missing possibility to search records by those relation columns, it is very hard to access specific records using the standard BE list module or to assign specific records to e.g. „ selectMultipleSideBySide“ fields :(</n:1>

  6. Markus Klein commented <span data-processor="relativetime" data-value="2026-04-27T15:21:08+00:00" > 04/27/26, 15:21 </span>

    We used to implement this in v11 with the hook $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][DatabaseRecordList::class]['makeSearchStringConstraints']

    https://github.com/TYPO3/typo3/blob/0e1abfddb4b09ba9419c939b23f43a4a3b8a5da7/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php#L2722-L2722

    This allowed us to add SQL like `‘EXISTS (SELECT …)’` to the inner “OR” query.

    Unfortunately, this was replaced with an insufficient event with https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-98490-VariousHooksAndMethodsChangedInDatabaseRecordList.html#breaking-98490-various-hooks-and-methods-changed-in-databaserecordlist.
    One must now kind of search the querybuilder to replace the correct OR-constraints with the enriched one. :-(

  7. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-12T19:24:49+00:00" > 11/12/26, 19:24 </span>

    closing in favor of #40689