Skip to content

CP Entry Manager not retaining sorted columns on pagination links #1057

@maxbato

Description

@maxbato

Description of the problem
Losing column sort after clicking pagination links in the CP entry manager.

How To Reproduce
Steps to reproduce the behavior:
Go to Entry Manager for channel with more than 25 entries
Sort by any column (i.e. Status)
Click Page 2
Notice your list is no longer sorted

Environment Details:

  • Version: [5.4.2]
  • PHP Version [7.4]
  • MySQL Version [5.6.43]
  • OS: [Linux]
  • Web Server: [Apache]

Possible Solution
Need to retain the sort paramter within the $link variable when outputting the pagination urls.
The following actually works:
1st sorted url on page 1 (sorted by status):
/system/index.php?/cp/publish/edit&search_in=titles&perpage=25&search=&sort_col=column_status&sort_dir=asc

If i simply append "&page=2" to that url, it works. i.e.:
/system/index.php?/cp/publish/edit&search_in=titles&perpage=25&search=&sort_col=column_status&sort_dir=asc&page=2

Default page2 or any page link url without doing the above is:
/system/index.php?/cp/publish/edit&search_in=titles&perpage=25&search=&sort_col=column_entry_date&sort_dir=desc

See the difference?

Hopefully this is an easy fix?

Metadata

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