[GH-ISSUE #995] Bug: Clicking the next button on search results page resets to main index instead of paginating correctly #2129

Closed
opened 2026-03-01 17:56:43 +03:00 by kerem · 5 comments
Owner

Originally created by @TheAnachronism on GitHub (Jul 4, 2022).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/995

Describe the bug

When using the search functionality and getting so many results back that multiple pages are available, using the next link at the bottom, resets the search and just goes to the next page of all archived sites. The pagination for search results is available if someone writes the URL correctly themselves, but the links seem broken.

Steps to reproduce

  • Archive enough sites that multiple pages are available.
  • Use the search bar to search for something
  • Use the next button at the bottom of the page to to got page 2

Screenshots or log output

As seen below, first /public/?q=test gets called and then only the page=2 query parameter get set. The combination of the two /public/?q=test&page=2 works, but the links don't seem to do that correctly.

"GET /admin/ HTTP/1.1" 200 16927
"GET /admin/ HTTP/1.1" 200 16927
"GET /admin/ HTTP/1.1" 200 16927
"GET /public/ HTTP/1.1" 200 126301
"GET /docs/ HTTP/1.1" 302 0
"GET /public/ HTTP/1.1" 200 126301
"GET /public/?q=test HTTP/1.1" 200 126301
"GET /public/?page=2 HTTP/1.1" 200 126663

ArchiveBox version

ArchiveBox v0.6.3
Cpython Linux Linux-5.10.0-11-amd64-x86_64-with-glibc2.31 x86_64
IN_DOCKER=True DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.6.3          valid     /usr/local/bin/archivebox                                                   
 √  PYTHON_BINARY         v3.10.4         valid     /usr/local/bin/python3.10                                                   
 √  DJANGO_BINARY         v3.1.14         valid     /usr/local/lib/python3.10/site-packages/django/bin/django-admin.py          
 √  CURL_BINARY           v7.74.0         valid     /usr/bin/curl                                                               
 -  WGET_BINARY           -               disabled  /usr/bin/wget                                                               
 √  NODE_BINARY           v17.9.0         valid     /usr/bin/node                                                               
 √  SINGLEFILE_BINARY     v0.3.16         valid     /node/node_modules/single-file/cli/single-file                              
 -  READABILITY_BINARY    -               disabled  /node/node_modules/readability-extractor/readability-extractor              
 -  MERCURY_BINARY        -               disabled  /node/node_modules/@postlight/mercury-parser/cli.js                         
 -  GIT_BINARY            -               disabled  /usr/bin/git                                                                
 -  YOUTUBEDL_BINARY      -               disabled  /usr/local/bin/yt-dlp                                                       
 √  CHROME_BINARY         v100.0.4896.127  valid     /usr/bin/chromium                                                           
 √  RIPGREP_BINARY        v12.1.1         valid     /usr/bin/rg                                                                 

[i] Source-code locations:
 √  PACKAGE_DIR           24 files        valid     /app/archivebox                                                             
 √  TEMPLATES_DIR         4 files         valid     /app/archivebox/templates                                                   
 -  CUSTOM_TEMPLATES_DIR  -               disabled                                                                              

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled                                                                              
 -  COOKIES_FILE          -               disabled                                                                              

[i] Data locations:
 √  OUTPUT_DIR            6 files         valid     /data                                                                       
 √  SOURCES_DIR           739 files       valid     ./sources                                                                   
 √  LOGS_DIR              1 files         valid     ./logs                                                                      
 √  ARCHIVE_DIR           983 files       valid     ./archive                                                                   
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf                                                           
 √  SQL_INDEX             4.0 MB          valid     ./index.sqlite3
Originally created by @TheAnachronism on GitHub (Jul 4, 2022). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/995 <!-- Please fill out the following information, feel free to delete sections if they're not applicable or if long issue templates annoy you. (the only required section is the version information) --> #### Describe the bug <!-- A description of what the bug is, what you expected to happen, and any relevant context about issue. --> When using the search functionality and getting so many results back that multiple pages are available, using the `next` link at the bottom, resets the search and just goes to the next page of all archived sites. The pagination for search results is available if someone writes the URL correctly themselves, but the links seem broken. #### Steps to reproduce <!-- For example: 1. Ran ArchiveBox with the following config '...' 2. Saw this output during archiving '....' 3. UI didn't show the thing I was expecting '....' --> - Archive enough sites that multiple pages are available. - Use the search bar to search for something - Use the `next` button at the bottom of the page to to got page 2 #### Screenshots or log output <!-- If applicable, post any relevant screenshots or copy/pasted terminal output from ArchiveBox. If you're reporting a parsing / importing error, **you must paste a copy of your redacted import file here**. --> As seen below, first `/public/?q=test` gets called and then only the `page=2` query parameter get set. The combination of the two `/public/?q=test&page=2` works, but the links don't seem to do that correctly. ```logs "GET /admin/ HTTP/1.1" 200 16927 "GET /admin/ HTTP/1.1" 200 16927 "GET /admin/ HTTP/1.1" 200 16927 "GET /public/ HTTP/1.1" 200 126301 "GET /docs/ HTTP/1.1" 302 0 "GET /public/ HTTP/1.1" 200 126301 "GET /public/?q=test HTTP/1.1" 200 126301 "GET /public/?page=2 HTTP/1.1" 200 126663 ``` #### ArchiveBox version <!-- Run the `archivebox version` command locally then copy paste the result here: --> ```logs ArchiveBox v0.6.3 Cpython Linux Linux-5.10.0-11-amd64-x86_64-with-glibc2.31 x86_64 IN_DOCKER=True DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep [i] Dependency versions: √ ARCHIVEBOX_BINARY v0.6.3 valid /usr/local/bin/archivebox √ PYTHON_BINARY v3.10.4 valid /usr/local/bin/python3.10 √ DJANGO_BINARY v3.1.14 valid /usr/local/lib/python3.10/site-packages/django/bin/django-admin.py √ CURL_BINARY v7.74.0 valid /usr/bin/curl - WGET_BINARY - disabled /usr/bin/wget √ NODE_BINARY v17.9.0 valid /usr/bin/node √ SINGLEFILE_BINARY v0.3.16 valid /node/node_modules/single-file/cli/single-file - READABILITY_BINARY - disabled /node/node_modules/readability-extractor/readability-extractor - MERCURY_BINARY - disabled /node/node_modules/@postlight/mercury-parser/cli.js - GIT_BINARY - disabled /usr/bin/git - YOUTUBEDL_BINARY - disabled /usr/local/bin/yt-dlp √ CHROME_BINARY v100.0.4896.127 valid /usr/bin/chromium √ RIPGREP_BINARY v12.1.1 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 24 files valid /app/archivebox √ TEMPLATES_DIR 4 files valid /app/archivebox/templates - CUSTOM_TEMPLATES_DIR - disabled [i] Secrets locations: - CHROME_USER_DATA_DIR - disabled - COOKIES_FILE - disabled [i] Data locations: √ OUTPUT_DIR 6 files valid /data √ SOURCES_DIR 739 files valid ./sources √ LOGS_DIR 1 files valid ./logs √ ARCHIVE_DIR 983 files valid ./archive √ CONFIG_FILE 81.0 Bytes valid ./ArchiveBox.conf √ SQL_INDEX 4.0 MB valid ./index.sqlite3 ``` <!-- Tickets without full version info will closed until it is provided, we need the full output here to help you solve your issue -->
Author
Owner

@EsEnZeT commented on GitHub (Nov 29, 2022):

I confirm I'm experiencing exact same issues with latest builds.

<!-- gh-comment-id:1331032705 --> @EsEnZeT commented on GitHub (Nov 29, 2022): I confirm I'm experiencing exact same issues with latest builds.
Author
Owner

@pirate commented on GitHub (Jan 19, 2024):

This should be fixed in the latest versions >v0.7.2 https://github.com/adasneves127/ArchiveBox/pull/2

Let me know if you're still having issues and I'll reopen the ticket.

<!-- gh-comment-id:1899643162 --> @pirate commented on GitHub (Jan 19, 2024): This should be fixed in the latest versions >v0.7.2 https://github.com/adasneves127/ArchiveBox/pull/2 Let me know if you're still having issues and I'll reopen the ticket.
Author
Owner

@sclu1034 commented on GitHub (Aug 29, 2024):

I just pulled the latest :dev image and I'm running into this issue.

<!-- gh-comment-id:2317852510 --> @sclu1034 commented on GitHub (Aug 29, 2024): I just pulled the latest `:dev` image and I'm running into this issue.
Author
Owner

@pirate commented on GitHub (Aug 29, 2024):

Yup I just confirmed I'm seeing the issue too, thanks for reporting.

<!-- gh-comment-id:2318922959 --> @pirate commented on GitHub (Aug 29, 2024): Yup I just confirmed I'm seeing the issue too, thanks for reporting.
Author
Owner

@pirate commented on GitHub (Oct 4, 2024):

This is fixed as of v0.8.5-rc: github.com/ArchiveBox/ArchiveBox@89a066da0b

<!-- gh-comment-id:2393004299 --> @pirate commented on GitHub (Oct 4, 2024): This is fixed as of [v0.8.5-rc](https://github.com/ArchiveBox/ArchiveBox/releases/tag/v0.8.5-rc): https://github.com/ArchiveBox/ArchiveBox/commit/89a066da0bd3631f163781fc8ff549d3c4d947cd
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2129
No description provided.