Project

General

Profile

Actions

Task #93577

closed

Epic #93528: Backlog of UX ideas for Editors

Enable the search box on sysfolders w/o any record

Added by Xavier Perseguers over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-02-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

searchbox.png (12.2 KB) searchbox.png Xavier Perseguers, 2021-02-24 08:10
clipboard-202102251117-2yiuj.png (97.8 KB) clipboard-202102251117-2yiuj.png Jo Hasenau, 2021-02-25 10:17
Actions #1

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

Actions #2

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 ?

Actions #3

Updated by Georg Ringer over 3 years ago

  • Status changed from New to Needs Feedback

should we close the issue?

Actions #4

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.

Actions #5

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.

Actions #6

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.

Actions #7

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.

Actions #8

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.

Actions

Also available in: Atom PDF