The pagination of explore page does not honor the sort attribute. #816

Closed
opened 2025-11-02 03:37:41 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @ThingsHybrid on GitHub (Jun 15, 2017).

  • Gitea version (or commit ref): 1.1.1 / 1.1.2
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

The explore page has the 'sort' option on dropdown menu. The sorting works on the first page. As soon as the 'Next' page button is clicked, it goes to the next page; however, the sort=[algorithm] is lost. If I manually add the query attribute to the url, it works correctly. I think this is a minor bug.

For example:
The url "/explore/repos?page=2&q=&tab=" should have been "/explore/repos?sort=alphabetically&q=&tab=&page=2" where the "sort=[algorithm]" should be included.

Originally created by @ThingsHybrid on GitHub (Jun 15, 2017). - Gitea version (or commit ref): 1.1.1 / 1.1.2 - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description The explore page has the 'sort' option on dropdown menu. The sorting works on the first page. As soon as the 'Next' page button is clicked, it goes to the next page; however, the sort=[algorithm] is lost. If I manually add the query attribute to the url, it works correctly. I think this is a minor bug. For example: The url "/explore/repos?page=2&q=&tab=" should have been "/explore/repos?sort=alphabetically&q=&tab=&page=2" where the "sort=[algorithm]" should be included.
GiteaMirror added the type/bug label 2025-11-02 03:37:41 -06:00
Author
Owner

@bkcsoft commented on GitHub (Jun 19, 2017):

this is the file that needs fixing: https://github.com/go-gitea/gitea/blob/master/templates/base/paginate.tmpl

@bkcsoft commented on GitHub (Jun 19, 2017): this is the file that needs fixing: https://github.com/go-gitea/gitea/blob/master/templates/base/paginate.tmpl
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#816