openlibhums / openlibhums/janeway

wrong last page on articles page

Open
#4,580 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug dev-ready Priority high Size S
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Describe the bug
When browsing the /articles page of a journal on any theme, the last page number doesn't work as intended due to changes on the page size parameter.

Janeway version
v1.7.3

To Reproduce
Steps to reproduce the behavior:

  1. Go to /articles on any journal
  2. Click on the link to the last page
  3. Scroll down to the page numbers
  4. See that you are not on the last page, but rather the middle of the page range

Expected behavior
The shown last page should match the presented default page size so it behaves as the last page

Screenshots
When on page 1
image
When clicking last page (16)
image

Additional context
It could be fixed by making sure the default for the "records per page" form element matches the value that is being used to render the initial results

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the /articles page and its records-per-page form element to find where the initial results and pagination links get their page-size values. Reproduce the last-page behavior on a journal, then verify that the displayed last page uses the same default page size as the initial results.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.