Skip Navigation

[Resolved] Map marker count when clustering is doubled

This support ticket is created 3 years 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by heinP 3 years ago.

Assisted by: Minesh.

Author
Posts
#2253469

Tell us what you are trying to do?
When clustering the count is actually the double of what is really there. Not only is the count double, but actually every post is shown twice. So even when there is only one post type behind a location, the map shows two markers, both clickable.

Is there any documentation that you are following?
I found a similar ticket, but without real solution: https://toolset.com/forums/topic/for-maps-the-cluster-option-on-the-map-is-displaying-incorrect-marker-count/
Is there a similar example that we can see?
I can give access to the site.
What is the link to your site?

#2254065

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL and admin access details so I can check whats going wrong with your setup.

I checked the reference ticket you shared but the supporter was not able to reproduce the issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2254119

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I can see the problem. As we do not recommend to debug the issue on production sites. I would like to have a duplicator copy of your site in order to debug the issue further.
=> https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#2254707

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing duplicator package.

I checked and found that you have multiple Address field entry available in postmeta table for the custom field "geolocation". Maybe you tried to import the address and due to that there are multiple entry are there in post meta table per post for the geolocation custom field.

What you will have to do is backup your database and find all events posts and loop through the found event post one by one and then get the geolocation custom field value using get_post_meta() function for the current post in loop (you will find you will have multiple entries available for geolocation field per post) and then delete one of the post meta.

Please let me know if you will require help with this tedious task.

#2254743

I would not know how to do what you are proposing. I am a hobby-ist, and not a professional IT-er.

Does this require programming in some way?
Does this require actions straight into the database?
Or can I somehow do it from the normal WP interface?

So yes, if there is a way you can set it up for me, that would be worldclass. The tedious work of deleting the double entry, I will do myself ofcourse.

#2254771

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Does this require programming in some way?
==> Yes but its custom code.

Does this require actions straight into the database?
==>
Yes, if you go with custom code.

Or can I somehow do it from the normal WP interface?
==>
Yes, if you are ready to edit every event post from admin then you can do it using admin.

Please take FULL backup of your database first before you perform any action.
Once you take full backup of your database:

I've set option "Allow multiple instances of this field" for the custom field "Geolocation":
- hidden link

Now, you can edit event posts one by one and delete me multiple entry you found for "Geolocation" custom field. For instance, here is the sample post:
=> hidden link

You should delete the extra Geolocation entry and save the post. Once you done with every post you should go here:
=> hidden link

And set the option "This field can have only one value " for the custom field "Geolocation" and save.

#2254783

And here we go with the clean-up!
Solution works for me. Thank you.