Task #93577
closedEpic #93528: Backlog of UX ideas for Editors
Enable the search box on sysfolders w/o any record
100%
Description
This problem has been reported by one of my editors, in TYPO3 v9.
Context¶
- Module: Web > List
Normal Behaviour¶
- Select a folder containing DB records
- You can toggle the search box in the toolbar:
Limitation¶
- Select a folder containing only subfolders but not any DB records
- You cannot toggle the search box in the toolbar since the icon is gone!
Analysis¶
In \TYPO3\CMS\Recordlist\Controller\RecordListController:637
(https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/recordlist/Classes/Controller/RecordListController.php#L637) we have this condition to include the button in the toolbar:
if (!$this->modTSconfig['properties']['disableSearchBox'] && ($dblist->HTMLcode || !empty($dblist->searchString))) {
Since there are no DB records, TYPO3 thinks it's not worth showing the button. This is logical if you keep the Search Levels to 1 single level but if you search on 2 or more levels, then it's highly useful to keep the button since it allows for an editor to find a given record without knowing exactly where to look for it, by starting the search from some "higher level", some enclosing folder!
Suggestion¶
--- typo3/sysext/recordlist/Classes/Controller/RecordListController.php 2021-02-24 09:17:49.000000000 +0100 +++ typo3/sysext/recordlist/Classes/Controller/RecordListController.php 2021-02-24 09:17:49.000000000 +0100 @@ -634,7 +634,7 @@ // Setting up the buttons for docheader $dblist->getDocHeaderButtons($this->moduleTemplate); // search box toolbar - if (!$this->modTSconfig['properties']['disableSearchBox'] && ($dblist->HTMLcode || !empty($dblist->searchString))) { + if (!$this->modTSconfig['properties']['disableSearchBox']) { $this->content = $dblist->getSearchBox(); $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ToggleSearchToolbox');
Files
Updated by Xavier Perseguers over 3 years ago
Somehow the problem is related that on my 2 big installs (v9), the subpages are not visible as DB records in Web > List.
Cannot reproduce on a vanilla TYPO3 v9, v10 or v11. Wonder where this is originating from...
Updated by Xavier Perseguers over 3 years ago
After disabling EXT:gridelements, subpages are visible again in Web > List. There are no configuration options in that extension to keep those records.
Strange that they are hidden. Did not investigate much but possibly this is a side-effect of this definition:
$GLOBALS['TCA']['tt_content']['columns']['records']['config']['allowed'] .= ',pages';
and thus not willing to see pages records anymore in Web > List ?
Updated by Georg Ringer over 3 years ago
- Status changed from New to Needs Feedback
should we close the issue?
Updated by Xavier Perseguers over 3 years ago
I'd really like a feedback from JoH so that this ticket is self-explaining and -contained.
Updated by Jo Hasenau over 3 years ago
The definition
$GLOBALS['TCA']['tt_content']['columns']['records']['config']['allowed'] .= ',pages';
just adds 'pages' as allowed table for the 'insert records' element, which is used to show direct references to DB records on a page.
This enables editors to reference whole pages instead of having to reference each single record of that page separately.
So I don't see how that should affect search box related behaviour at all.
Updated by Jo Hasenau over 3 years ago
Just checked it on our Gridelements and L10nmgr testsite and the searchbox shows up properly with both the default list module and the XCLASS to show nested structures of Grid containers.
So I guess the problem is not directly related to Gridelements alone.
Updated by Jo Hasenau over 3 years ago
Just checked it on our Gridelements and L10nmgr testsite and the searchbox shows up properly with both the default list module and the XCLASS to show nested structures of Grid containers.
So I guess the problem is not directly related to Gridelements alone.
Since your original screenshot shows a paste icon too I just checked it again with a filled cipboard and still the search icon shows up properly.
Updated by Xavier Perseguers over 3 years ago
- Status changed from Needs Feedback to Closed
- % Done changed from 0 to 100
OK, then it must be in another XCLASS of mine, somehow, since I needed to add some kind of a dashboard at the beginning of Web > List, for some folders. I must have forgotten something at some point when I upgraded gridelements or did not pay attention that some method has slightly changed upstream.
Thanks for your comments.