dandi / dandi/dandi-archive

Bug: UI search result filters + pagination

Open
#2,763 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
21
Avg merge
4d 23h
Merged PRs (30d)
15

Description

https://github.com/user-attachments/assets/65b246ec-7164-49b5-a4be-f607e52b23e9

I wanted to look up all the published OpenScope datasets, but found a bug with the filters and pagination. When I went to the second page, the web interface did not show me a second page of results but continued to show me results from the first page.

Dev console output in case it's helpful:
[cs][obg31][utils] readHtmlAndAutocomplete Object https://dandiarchive.org/dandiset/search?search=OpenScope&page=2&sortOption=0&sortDir=-1&showDrafts=false&showEmpty=false Object 1939486787
search?search=OpenScope&page=2&sortOption=0&sortDir=-1&showDrafts=false&showEmpty=false:1 Access to XMLHttpRequest at 'https://api.dandiarchive.org/api/dandisets/?page=1&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false' from origin 'https://dandiarchive.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
installHook.js:1 an
overrideMethod @ installHook.js:1Understand this error
api.dandiarchive.org/api/dandisets/?page=1&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false:1 Failed to load resource: net::ERR_FAILEDUnderstand this error
search?search=OpenScope&page=2&sortOption=0&sortDir=-1&showDrafts=false&showEmpty=false:1 Access to XMLHttpRequest at 'https://api.dandiarchive.org/api/dandisets/?page=2&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false' from origin 'https://dandiarchive.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
installHook.js:1 an
overrideMethod @ installHook.js:1Understand this error
api.dandiarchive.org/api/dandisets/?page=2&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false:1 Failed to load resource: net::ERR_FAILEDUnderstand this error
search?search=OpenScope&page=2&sortOption=0&sortDir=-1&showDrafts=false&showEmpty=false:1 Access to XMLHttpRequest at 'https://api.dandiarchive.org/api/dandisets/?page=1&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false' from origin 'https://dandiarchive.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
installHook.js:1 an {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …}
overrideMethod @ installHook.js:1
Mxe @ index-Bj2_PjQQ.js:44
mp @ index-Bj2_PjQQ.js:44
Wm @ index-Bj2_PjQQ.js:44
mp @ index-Bj2_PjQQ.js:44
(anonymous) @ index-Bj2_PjQQ.js:44Understand this error
api.dandiarchive.org/api/dandisets/?page=1&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false:1 Failed to load resource: net::ERR_FAILEDUnderstand this error
search?search=OpenScope&page=2&sortOption=0&sortDir=-1&showDrafts=false&showEmpty=false:1 Access to XMLHttpRequest at 'https://api.dandiarchive.org/api/dandisets/?page=2&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false' from origin 'https://dandiarchive.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.Understand this error
installHook.js:1 an {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …}
overrideMethod @ installHook.js:1
Mxe @ index-Bj2_PjQQ.js:44
mp @ index-Bj2_PjQQ.js:44
Wm @ index-Bj2_PjQQ.js:44
mp @ index-Bj2_PjQQ.js:44
(anonymous) @ index-Bj2_PjQQ.js:44Understand this error
api.dandiarchive.org/api/dandisets/?page=2&page_size=8&ordering=-modified&search=OpenScope&draft=false&empty=false&embargoed=false:1 Failed to load resource: net::ERR_FAILEDUnderstand this error

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue at the /dandiset/search URL using the OpenScope query and page 2, then inspect the browser console and the api.dandiarchive.org/api/dandisets/ requests. Compare the page and filter parameters with the results shown in the web interface; done means pagination displays the requested page and the selected filters remain applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.