Skip to content

Fix separator issue in URL parameter #1483

Open
@dmartinezh97

Description

Describe the bug
When using the pagination feature, the URL for the prev parameter does not correctly append the query string separator. This results in malformed URLs when navigating through pages.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a page with a pagination component.
  2. Ensure the current URL contains a query string (e.g., https://example.com/data?page=1).
  3. Click on the pagination button to go to the next page.
  4. Observe the resulting URL for the prev parameter.

Expected behavior
The expected behavior is that when navigating through pages, the URL should correctly append parameters. For example, if the current URL is https://example.com/data?page=1 and the user navigates to page 2, the resulting URL should be https://example.com/data?page=1&page=2.

Screenshots
N/A

Desktop:

  • OS: Windows 11
  • Browser: Chrome
  • Version: 117.0.5938.92

Smartphone
N/A

Additional context
A possible solution is to modify the URL construction logic in the pagination code to check if the prev URL already contains a ?. If it does, the code should use & as the separator; otherwise, it should use ?.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions