Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering on models based on Page model doesn't work correctly #23

Open
bplociennik opened this issue May 21, 2020 · 0 comments
Open

Ordering on models based on Page model doesn't work correctly #23

bplociennik opened this issue May 21, 2020 · 0 comments
Labels
type:Bug Something isn't working

Comments

@bplociennik
Copy link

bplociennik commented May 21, 2020

Issue Summary

There is a small issue with the ordering list for the models based on the Page model.

When you want to order on more than one field then the recently clicked column is present in order query param as the first not as the second.

Another behavior is on the basic models (ModelAdmin). When we choose second column to filter the order of that ids in the o query param is correct.

Page listing with one field to order:
/admin/properties/propertypage/?o=0

Page listing with two fields to order:
/admin/properties/propertypage/?o=2.0

Excepted result (from the model admin listing):
/admin/properties/propertypage/?o=0.2

Steps to Reproduce

  1. go to the listing for any model inherits from Page model
  2. click to sort by the first column
  3. after reloading choose another column to sort as the second sorting
  4. sorting works by second column firstly then for the first column

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

  • I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: I didn't have time to check on the fresh project

Expected Result

  • Ordering for models based on the Page model should work identically as it is in the model admin

Technical details

  • Python version: 3.8.2
  • Django version: 3.0.6
  • Wagtail version: 2.9
  • Browser version: Chrome 81
@bplociennik bplociennik added the type:Bug Something isn't working label May 21, 2020
@laymonage laymonage transferred this issue from wagtail/wagtail Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant