Project

General

Profile

Actions

Task #70849

closed

Make Searchlevels in Live- and Listsearch constistend

Added by Marcus Schwemer over 7 years ago. Updated over 5 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 #1

Updated by Marcus Schwemer over 7 years ago

Thought about a clean solution.

What about this: We add an pageTS - option "mod.web_list.searchLevels"

mod.web_list.searchLevels {
   0 = EXT:lang/locallang_core.xlf:thisPage
   1 = EXT:lang/locallang_core.xlf:1level
   2 = EXT:lang/locallang_core.xlf:2levels
   3 = EXT:lang/locallang_core.xlf:3levels
   4 = EXT:lang/locallang_core.xlf:4levels
   infinite = EXT:lang/locallang_core.xlf:inifite
}

where 0..4 reflect the current status. The new one is "infinite" which is necessary to be consistent with the livesearch.

If somebody wants to add custom levels, (s)he can add additional values with custom labels via pageTS, where the id will be used as the depth of search-levels.

The "show all" button of the live search must always use the "infinite" id.

What do you think?

Kind regards
Marcus

BTW: In order to find a constistent solution for all searches, I checked the search in "mod.web_layout" The rendering of search results in "mod.web_layout" is completley broken ... I'll add another issue.

Actions #2

Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #3

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #4

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #5

Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #6

Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #7

Updated by Gerrit Code Review over 7 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #8

Updated by Gerrit Code Review over 7 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #9

Updated by Gerrit Code Review over 7 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #10

Updated by Gerrit Code Review about 7 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #11

Updated by Markus Sommer about 7 years ago

  • Assignee set to Marcus Schwemer
Actions #12

Updated by Gerrit Code Review almost 7 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #13

Updated by Gerrit Code Review almost 7 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/44171

Actions #14

Updated by Marcus Schwemer almost 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Riccardo De Contardi over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF