Bug #19814
closed
Backend search (/typo3/db_list.php): search_levels GP var
Added by Bjorn almost 16 years ago.
Updated over 9 years ago.
Description
The searchbar (backend-search-menu: the one in the top right of the backend interface) only allow backend users to search 4 levels into the page hierarchy.
I don't know the exact reason for the limitation (my guess would be a performance-issue).
Anyway, for my needs, i find the value 4 a bit low. I find the value "10" much more suitable.
The value is hardcoded in /typo3/js/backendsearch.js line 141
My patch changes the hardcoded value from 4 to 10.
The correct way would probably be to un-hardcode the value as an option somewhere.
(issue imported from #M10123)
Files
- Target version changed from 0 to 1728
I had this need too, but fixed with a quick rewrite in .htaccess.
RewriteCond %{QUERY_STRING} ^(.*)search_levels=4(.*)$
RewriteRule . %{REQUEST_URI}\?%1search_levels=10%2? [L]
I agree this should be manageable and not hardcoded.
Btw - the importet patch seems to be wrong. It's not the one from the original issue (M10123)
Are there any news about this?
In 4.7.10 this is still present.
Ie. Livesearch searches on all pages, but when I click on "Show all" only records which are max. 4 levels deep into the pagetree are shown.
Mads Jensen wrote:
I had this need too, but fixed with a quick rewrite in .htaccess.
RewriteCond %{QUERY_STRING} ^(.*)search_levels=4(.*)$
RewriteRule . %{REQUEST_URI}\?%1search_levels=10%2? [L]
Isn't the last "?" wrong? It gets appended to the searchstring, at least for me.
So I use:
RewriteCond %{QUERY_STRING} ^(.*)search_levels=4(.*)$
RewriteRule . %{REQUEST_URI}\?%1search_levels=10%2 [L]
- Target version deleted (
1728)
- Target version set to 7.4 (Backend)
- Is Regression set to No
In 6.2.14 and 7 (latest master) as far as I can see the lines mentioned about the .htaccess don't exists; the file
/sysext/backend/Resources/Public/JavaScript/livesearch.js contains the hardcoded "4":
getSearchResultsUrl : function(searchTerm) {
return 'id=' + this.searchResultsPid + '&search_levels=4&search_field=' + searchTerm;
},
- Status changed from New to Closed
Fixed. it's updated to 10 levels now.
Also available in: Atom
PDF