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 by connection not working #8

Open
jeffstieler opened this issue Jan 29, 2015 · 0 comments
Open

Ordering by connection not working #8

jeffstieler opened this issue Jan 29, 2015 · 0 comments
Labels

Comments

@jeffstieler
Copy link
Contributor

It appears that letting O2O form the query for ordering by connection sort is no longer working.

The find_in_set used in the SQL doesn't return the posts in the correct order.

Example query generated by O2O: SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (338,249,243) AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish')) ORDER BY find_in_set(wp_posts.ID, '338, 249, 243') ASC LIMIT 0, 9

This resulted in an order of 243, 249, 338.

The actual connection order can be queried by relying on 'orderby' => 'post__in' - so that might be a possible solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant