[Bug]: Unified search returns HTTP 500 for the Files provider when "is-favorite" or "title-only" is set
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Read apps/files/lib/Search/FilesSearchProvider.php, especially getSupportedFilters(), getCustomFilters(), and buildSearchQuery(). Reproduce the requests with is-favorite=1 and title-only=1, then inspect the related search tests. Done means both filters either work as advertised or are no longer advertised, and neither request returns HTTP 500.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug description
The Files search provider lists is-favorite and title-only as supported filters (FilesSearchProvider::getSupportedFilters(), and is-favorite is also declared in getCustomFilters()), but buildSearchQuery() has no branch for either of them. A search that sets one of them fails with InvalidArgumentException: Unsupported comparison and the OCS endpoint answers HTTP 500.
Steps to reproduce
- Log in as any user (basic auth works for the OCS API).
GET /ocs/v2.php/search/providers/files/search?term=reportreturns 200 with the results.GET /ocs/v2.php/search/providers/files/search?term=report&is-favorite=1returns HTTP 500, statuscode 996 "Internal Server Error".GET /ocs/v2.php/search/providers/files/search?term=report&title-only=1returns the same HTTP 500.- nextcloud.log has
InvalidArgumentException: Unsupported comparisonfor both requests.
Expected behavior
The filters the provider says it supports should either narrow the search (favorites only; name only, which is what the Files search already does) or be removed from the supported list, so the request does not fail with a 500.
Nextcloud Server version
master (36.0.0 dev, checked at 24e0f84c71d3)
Operating system
Debian-based Docker image (chialab/php:8.3)
PHP engine version
PHP 8.3 (8.3.36)
Web server
Other (PHP built-in server, php -S)
Database engine version
SQLite
Is this bug present after an update or on a fresh install?
Fresh install
Are you using the Nextcloud Server Encryption module?
No
What user-backends are you using?
Default user-backend (database)
Configuration report
Not needed, fresh test instance with default config.
List of activated Apps
Default apps enabled with tests/enable_all.php.
Nextcloud Signing status
Not applicable (development checkout).
Nextcloud Logs
{"Exception":"InvalidArgumentException","Message":"Unsupported comparison", ...}
Raised from apps/files/lib/Search/FilesSearchProvider.php, buildSearchQuery(), for the two requests above.
Additional info
Reproduced on a fresh install of current master. I did not check stable branches.
Assisted by ClaudeCode
- Lingua principale
- PHP
- Stelle
- 37.6k
- Fork
- 5.4k
- Merge medio
- 1g 13h
- PR unite (30g)
- 623
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextcloud/server
-
[Bug]: Axios Update NeededAperta0. Needs triage 35-feedback bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
34-feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: GET /js/../<anything> returns 500 (NotPermittedException from JsController::getJs) instead of 404Forse già presa @lazerg l’ha presa 7 giorni fa. Aperta35-feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Dashboard widgets registered via OCA.Dashboard.register() sometimes never mount (spinner forever) – Vue 3 non-deep `callbacks` watcher raceForse già presa @lazerg l’ha presa 7 giorni fa. Aperta35-feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextcloud/server
Issue simili
-
area: tests area: user refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nplhse/collaborative-ivena-statistics#1845 ·
I maintainer di solito rispondono entro 1 giorno
-
[Sync EN] filesystem: document the ValueError of fgets(), file_get_contents(), and touch() (#6167)Apertasync-en
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
sync-en
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
Перевод устарел
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
Documentation Feature: Events / Calendar
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno