Project

General

Profile

Actions

Task #70849

closed

Make Searchlevels in Live- and Listsearch constistend

Added by Marcus Schwemer over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2015-10-19
Due date:
% Done:

100%

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

Description

Right now the number of search levels are hardcoded in the livesearch and somehow in the search in the list module.

Livesearch

Using the livesearch, results are displayed for the complete website in the suggest box. If you click on "Show all" the search is limited to the 4 levels starting at page uid 0. If now your suggested search results are on level 5 or higher, the list search does not show them. The results in list search must reflect the results in the live search.

See file "typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js" on line 90:

88   $(containerSelector).on('click', '.t3js-live-search-show-all', function(evt) {
89       evt.preventDefault();
90       TYPO3.ModuleMenu.App.showModule('web_list', 'id=0&search_levels=4&search_field=' + encodeURIComponent($(searchFieldSelector).val()));
91   });

Possible Solutions:

  • Workaround
    Change it to a unreal high number of levels, like 9.999.999.999
  • Bugfix
    Fix the the list search, so it allows infinite levels and make the number of levels independent from "EXT:lang/locallang_core.xlf"

Listsearch

The available number of levels that will be included in the search is dependent from the settings in "EXT:lang/locallang_core.xlf"

Yes, you read it right ... if you change the label "labels.enterSearchLevels" to the following value

            <trans-unit id="labels.enterSearchLevels">
                <source>This page|1 level down|2 levels down|3 levels down|4 levels down|10 levels down</source>
            </trans-unit>

it will include 5 levels.

The reason is in file "/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php" on line 551, where the label is converted into an array and used for generating the drop down on lines 552 - 554.

This should have an option that allows to search infinite levels in order to make it consistent with the live search.

BTW: This behaviour is also there in TYPO3 6.2LTS


Related issues 1 (0 open1 closed)

Precedes TYPO3 Core - Bug #76432: Live-Search is broken for editorsClosed2016-06-02

Actions
Actions

Also available in: Atom PDF