Skip Navigation

[Resolved] A view is displays same results multiple times

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

Problem:
A View that includes a distance filter and shows posts that have an address field results in some posts being shown multiple times.

Solution:
The issue arose where posts had multiple address values for the same field, and has been fixed in Maps 1.8.3.

This support ticket is created 5 years, 4 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 17 replies, has 2 voices.

Last updated by andrei-laurentiuP 5 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1298323

I am trying to:
I have created a view to list certain CPT.
Link to a page where the issue can be seen:
I will provide access details & password through private message or email.
I expected to see:
A CPT being shown only once in the list instead of multiple times.
Instead, I got:
Same CPT is being displayed multiple times.

#1298375

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

When you say a CPT is shown multiple times, do you mean an individual post of some CPT, or do you mean all posts of some CPT are shown multiple times?

I'll set up a private reply if you want me to look at the View on your site.

Can you confirm which View, and where it is inserted?

#1298417

hidden link

View: hidden link

I cannot add password details since it is visible to everyone.

Also, I see that if I'm not logged in I see a different version of my reply here (the password I provided earlier - which I have changed in the meantime - still shows up to unlogged in users). Please provide a secure way to give you all access details and indications.

Thanks

#1298531

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I thought I had set up a private reply, but let me try again.

#1298541

Please hide the post. The whole post should be hidden not only the links!!

#1298547

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry about that, there seems to be a problem with the forum and the private replies.

I've trashed that reply of yours, and I'm contacting our systems team for them to investigate.

Meanwhile I'll check on your site.

#1298549

Thank you, Nigel!!

#1298551

Since you are on to it, maybe, if possible, you could have a look into another ticket as well: https://toolset.com/forums/topic/post-form-setting-featured-image-failure/

Shane is on a different timezone so it is a bit difficult to communicate. If it's not possible I'll wait for his reply.

Regards,
Andrei

#1298591

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The systems team have checked and the private replies are functioning as normal.

When a private reply is set up for you, the Private Information box includes a section for WordPress / server access. Only when you click the checkboxes for "I have created a full backup..." and "I have read and agree to the legal disclaimer" does the section to provide the site credentials appear.

If you enter any text in the Reply section below, that is a normal reply box that is public, and it seems like you added the password details there.

Could you try again? I'm setting the next reply as private once more.

#1298675

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks for that, I accessed your site.

Those results are very odd, I haven't seen anything like that before.

Using the debug tools I can see that the query is returning some of the same results twice, and Views is just outputting those results.

It seems to be related to Maps. If I temporarily disable Maps, then only single results are shown.

I think I'll need to take a copy of your site, although that's going to take some time, you have a huge number of inactive plugins and I'm going to need to individually blacklist each of those to reduce the size of the site package.

I'll then share it with my colleagues to investigate further.

I'll update you again tomorrow.

#1298697

Thank you Nigel!!! Sorry for the large amount of inactive plugins!! I am still testing things here. Will have to go through a general reset after I find the stable version of what I want. Thanks!

#1299217

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I copied your site and tidied it up so that only the essential plugins were used, and up-to-date, and the issue persisted, so I've passed that cleaned-up version of your site to my second tier colleagues so that they can debug and try to identify the issue.

I'll keep you posted with their findings.

#1299335

Thank you, Nigel.

#1299399

Hey, Nigel. I have recreated the issue on another view - for Public Profiles CPT. So, I have two address custom fields: (1) main headquarters and (2) regions of interest. I had set a search based on Distance to main HeadQuarters for the view:

[wpv-control-distance compare_field="mainheadquarters" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]

and changed it to Distance to RegionsofInterest:

[wpv-control-distance compare_field="regions-of-interest" distance_center_url_param="toolset_maps_distance_center" distance_radius_url_param="toolset_maps_distance_radius" distance_unit_url_param="toolset_maps_distance_unit"]

Now, the CPTs that have values set for both "main headquarters" and "regions of interest" are displayed twice. Also, it seems the search is comparing the distance to both custom fields, not only to the regions of interest, the one that is set. Somehow maybe the "main headquarters" is still there as a Distance Condition.

Maybe you can recreate this on a trial website with steps such as:
1) Create a CPT
2) Create 2 address custom fields for that CPT - e.g. address1 and address2
3) Create a view that uses Distance to one custom field (e.g. address1)
4) Change from first address custom field to the second one (e.g. address2)

#1301601

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Just to let you know that this issue has resolved and the fix will be included in the next Maps release, 1.8.3.

I'm not sure when that will be available but it shouldn't be too long, and I'll update here when it is.