Skip Navigation

[Resolved] duplicated post and sorting issues for logged in users.

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user was having a post duplicated in two pages of the same view.

Solution:
The issue was not on the WordPress or Toolset Views sides, but rather on how MySQL tries to order and paginate multiple posts by date, where these posts have the same date (2020-05-02 00:00:00)

The solution should be to add a secondary sorting field (e.g. the post title) so that there is something to distinguish between the posts according to the ordering rules. Or edit the post_date of those posts and make sure each one has a unique date. http://prntscr.com/z7yjis

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 5 replies, has 2 voices.

Last updated by Puntorosso 3 years, 1 month ago.

Assisted by: Jamal.

Author
Posts
#1916483

Hi Jamal, I have a problem with the pagination of the site hidden link.
If you go to the pagination 7 you will find this object
hidden link
But if you look then at page 8 you will find the same on the first position
hidden link

This happens only for logged in users, and the sorting is also different.

#1917777

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I built the copy of your website locally and I was not able to reproduce the issue at all. I got the same results for a logged-in user and a guest user.

Please follow the instruction in my previous private reply(January 25, 2021 at 3:45 pm) to migrate your website into our platform, then log in and check if the issue is reproduced or not. I wanted to do it my self, but the authentication link was not working for me anymore.

#1917823

Can you check now with the login data you have?
Thanks

#1923323

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I cloned the website to our online platform at CloudWays, and the same issues were reproducible where they were not on my local setup. So, I deactivated the Varnish cache, and analyzed the results for logged in and logged out users. The underlying SQL queries do not reveal anything. Deactivating AJAX for the view does not help either

So, I am escalating this to our 2nd Tier for assistance and I'll get back to you as soon as possible.

#1943637

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello there! Our second tier has found the origin of the issue. It is not on the WordPress or Toolset Views sides, but rather on how MySQL tries to order and paginate multiple posts by date, where these posts have the same date (2020-05-02 00:00:00)

The solution should be to add a secondary sorting field (e.g. the post title) so that there is something to distinguish between the posts according to the ordering rules. Or edit the post_date of those posts and make sure each one has a unique date. hidden link

I wanted to confirm this on your site, but the issue is not reproduced anymore, at least not with the post "Palma – Solide Maisonette Wohnung mit Garage"

I hope this helps. Let me know if you have any questions.

#1943821

Ok, god to know.
I have added a second sort to the search now.

Thanks a lot for your help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.