Passer la navigation

[Résolu] Getting duplicates in paginated View results

This support ticket is created Il y a 3 years, 7 months. 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Fuseau horaire du supporter : America/Jamaica (GMT-05:00)

Ce sujet contient 3 réponses, a 3 voix.

Dernière mise à jour par Shane Il y a 3 years, 7 months.

Assisté par: Shane.

Auteur
Publications
#2367915

Tell us what you are trying to do?
Trying to view results of a View/Query

What is the link to your site?
lien caché

I have a view that is not behaving correctly.
It is displaying duplicates in the results when changing pages.
I believe it is showing the correct NUMBER of results for the search results, but it looks like some unique posts are being substituted for duplicates. I can't be sure of this, because I can't figure out how to display the post count of the view results.

This is a block editor view, so it is difficult or impossible for me to troubleshoot. There doesn't seem to be any way to switch back to the classic editor so that I can access the code. I've been using types/views since 2014, and I've never had so much trouble since the block editor was implemented. =(

#2368079

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Are you using random ordering in conjunction with pagination?

The UI displays a warning that you will receive unexpected results (i.e. duplicates).

Random ordering and pagination are not compatible, so first check if that is how you have this set up.

#2371097

Nigel,
No, not using random ordering.. but I AM using ordering that is coming from a plugin.
I've added additional sorting controls that seem to be working for now.

Can you tell me how to output the returned post count in a block editor view?

Thanks

#2371197

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hello,

You can determine the number of items found by your view using the shortcode below.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153270

Thanks,
Shane