Bug #100750
closedBackend search does not work if user has too many searchable webmounts
100%
Description
Info: This affects the search in top-right corner of the backend, after clicking on the "Show all" button, if an editor user has too many searchable webmounts.
The id list returned by typo3_src/typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php->getSearchableWebmounts
can contain ids multiple times.
We encountered a problem in a large TYPO3 system where this function returned about 78000 ids instead of about 2300 unique ids for an editor. This led to the error, that the sql query in DatabaseRecordList.php->getTable
executed by $queryBuilderTotalItems
had too many placeholders.
In my opinion, this bug can be easily fixed, by calling array_unique
on the id list before saving it to the runtime cache and returning it from the function.
https://github.com/TYPO3-CMS/recordlist/blob/main/Classes/RecordList/DatabaseRecordList.php#L2860