Skip Navigation

[Resolved] Duplicate Map Markers Being Posted to Map

This support ticket is created 5 years, 7 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 – 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 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 26 replies, has 2 voices.

Last updated by LCR 5 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1235026

LCR

We are trying to load location to our map but it has been extremely slow and our custom filtering seemed to be broken. After investigating this we have found that every post marker has been duplicated.

For example post (2680) also has a (2680-1) marker being posted directly underneath of it. I expect that this is why the map has been loading slow and why the filter we built no longer works.

The problem is we don't know where the post lives. We have looked in the client-side backend of WordPress, the MySQL database, we have done an XML export to look through the site data to find the duplicate.

We even had the same view post just the text of the Title, ID, and the Slug for all our posts without the map we only see one of every location.

We are still unable to see where these posts live in the site, they just seem to be posting on the map as markers... the request for debugging causes the site page to fail so we can't review or provide the debug information to help either.

Please let us know what our next course of action should be.

Thank you,

#1235054

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Justin,

Thank you for getting in touch.

Could you send me your view code so that I can have a look ?

This may allow me to see where the issue is.

Thanks,
Shane

#1235066

LCR

---Loop Editor---

[wpv-layout-start]
[wpv-items-found]

<div class="fieldable-panels-pane container-fluid brick no-bottom-margin" id="map-brick">
[wpv-map-render map_id="map" map_width="100%" map_height="800px" style_json="hidden link"][/wpv-map-render]
</div>
<!-- wpv-loop-start -->

<wpv-loop>
[wpv-post-body view_template="Loop item in Map"]
</wpv-loop>

<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

--- Loop item in Map ---

[wpv-conditional if="( $(wpcf-current-google-address) ne '' ) AND ( $(wpcf-current-google-address) ne 'NA' ) AND ( $(wpcf-current-google-address) ne '?' )"]
[wpv-map-marker map_id='map' marker_id='[wpv-post-id]' marker_title="[wpv-post-title]" id="$posttype" marker_icon='//victorians.ucalgary.ca/wp-content/plugins/toolset-maps/resources/images/markers/Home.png' marker_field='wpcf-current-google-address']
<h4>[wpv-post-title]</h4>
<p>[wpv-conditional if="( $(wpcf-city) )"][types field='city'][/types],[/wpv-conditional] [types field='country'][/types]</p>
<hr>
<p>[wpv-view name="who-lived-here-popup-map-marker-details"]</p>

<p>[types field='residence-from' item='@people-location.intermediary'][/types]</p>
[/wpv-map-marker]
[/wpv-conditional]

#1235085

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Justin,

I see that in the view you have this view as well [wpv-view name="who-lived-here-popup-map-marker-details"]

Is there any marker information in this view?

Please let me know.
Thanks,
Shane

#1235123

LCR

No there are no markers being called in that view, it is simply the relationship data being called in plain text...

--- Loop Editor ---
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-body view_template="loop-item-in-who-lived-here-popup-map-marker-details"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

--- Templates for this View ---
<ul class='list-unstyled'>

  • [wpv-post-link item="@people-location.parent"]
  • [wpv-conditional if="( $(wpcf-residence-to) ) AND ( $(wpcf-residence-from) )"]

  • Residence from [types field='residence-from' style='text' format='Y'][/types] to [types field='residence-to' style='text' format='Y'][/types]
  • [/wpv-conditional]
    [wpv-conditional if="( $(wpcf-not-before) ) AND ( $(wpcf-not-after) )"]

  • Residence Not Before [types field='not-before' style='text' format='Y'][/types] and Not After [types field='not-after' style='text' format='Y'][/types]
  • [/wpv-conditional]

    <hr>

    #1235130

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Justin,

    Thank you for the additional information.

    Would you mind allowing me to have admin access to the site to have a look ?

    The private fields have been enabled. Also please send me a link to the page with the map.
    Thanks,
    Shane

    #1235131

    LCR

    I was able to get some debug information from my local copy of the site, would it help, and what is the best way to getting it to you?

    #1235136

    LCR

    Please let me know when you are done so I can remove this user.

    Thank you,

    #1235286

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Justin,

    Not seeing where you provided the url for the site.

    I'll enable the private fields again so you can provide the url to the site as well as the URL to the map as well as the credentials in a secure field.

    Thanks,
    Shane

    #1235294

    LCR

    Sorry! Site is hidden link

    #1235301

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Justin,

    Are you not able to see the private fields ?

    I've enabled them but i'm not seeing your post as private. I had removed the credentials because they were public.

    Could you try adding them again.

    #1235305

    LCR

    Updated Cred provided.

    #1235718

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Justin,

    Thank you I was able to log in,

    Could you send me a screenshot of an example duplicate? I checked on this and the markers that I looked at there were no duplicates.

    Thanks,
    Shane

    #1235729

    LCR
    duplicates.jpg

    There are no duplicates except on the map. There are two markers overlapping each other and we have no clue where they are. It looks like your plugin for some reason is creating two markers one with the normal id and another with a '-1'.

    Example: 2570 is created as a map marker and it also has 2570-1.

    You can see it in the developer tools in the browser (as seen in the screenshot).

    In your console, if you run:
    WPViews.view_addon_maps.markers.map[2570].setVisible(false);

    Then run:
    WPViews.view_addon_maps.markers.map['2570-1'].setVisible(false);

    Both the markers will disappear, proving that there are two markers being loaded for no reason because there isn't any duplicate data in the site.

    Thank you,

    #1235872

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Justin,

    The issue was being caused by the marker_id='[wpv-post-id]' so what i did was to just add marker_id='marker-1' Is there a particular reasoning why you want the post ID there?

    Thanks,
    Shane