Skip Navigation

[Resolved] Map not updating when location deleted

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 12 replies, has 1 voice.

Last updated by lucyD 2 weeks, 3 days ago.

Assisted by: Minesh.

Author
Posts
#2828175
putteridge-bury.jpg

I am trying to: I have a map embedded in an Elementor page using the Toolset View element.

Link to a page where the issue can be seen: hidden link

I expected to see: We have deleted the Venue (custom post type) Putteridge Bury but it is still showing on the map North East of Luton (see image).

I have gone into Toolset, Settings, Maps. In the Cached Data section I Load Stored Data and remove the item with address Luton LU2 8LE, UK. I see the message 'All changes saved' but if I go out and in again the location is back on the list.

Instead, I got:

#2828180

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Have you tried to clear the view's cache or disable your block view cache?

Please check the following screenshot:
- https://toolset.com/wp-content/uploads/2021/01/1920755-Screen_Shot_2021_01_27_at_10.50.58_AM.png

#2828182
cache.jpg

The view isn't created using the block editor and in the list of views it says 'not cached'. I've tried clearing all the caches I can find and it still seems strange that the address reappears on the list in the Settings.

#2828211

Minesh
Supporter

Languages: English (English )

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

I see you are using classic view.

you can disable the Views caching layer for any View in a few by adding cached="off" attribute.

If the View is inserted in the page using a shortcode, you can add the cached="off" attribute in the shortcode, for example:

[wpv-view name="Your view" cached="off"]

More info:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154377

#2828225
postcode.jpg

That doesn't make any difference and I think the problem is that the venue-location still exists in the database - it looks like it hasn't been cleaned up properly when the venue has been deleted.

So I have a custom post type venue and within that there's a repeatable field group venue-location. When I search the database for the post code (zip code) of the location I can still see the record in the screenshot. I think Toolset must be still seeing the location from that record.

I've tried running a couple of databased cleaning plugins but it's still there. I wonder whether I am safe to delete that record?

#2828295

Minesh
Supporter

Languages: English (English )

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

I would like to know - how you actually deleted the record?

When you have repeating field group item - it will form one-to-many post-relationship internally between the parent (where you added the repeating field group item - one) and repeating field group items (many).

#2828320
Screenshot 2025-10-08 090010.jpg

Hi Minesh. Just in the regular way by deleting it from the list of Venues. Best wishes Lucy

#2828336

Minesh
Supporter

Languages: English (English )

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

You said:

So I have a custom post type venue and within that there's a repeatable field group venue-location. When I search the database for the post code (zip code) of the location I can still see the record in the screenshot. I think Toolset must be still seeing the location from that record.
==>
I would like to know the custom field that holds the Map address value belongs to the repeating field group or Venue post type?

Can you please share admin access details and tell me what marker is still visible and where and I'm happy to investigate this further.

*** 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.

#2828406

Minesh
Supporter

Languages: English (English )

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

I'm checking the all venues:
- hidden link

But I dont find the post with title "Putteridge Bury" - am I missing anything here?

#2828423

That's the problem 🙂 The venue Putteridge Bury has been deleted but the location is still showing on the map!

#2828427

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

With the view you have:
- hidden link

I set the view to query the repeating fied group "Venue location".

I've changed how you are displaying the marker. Within the view's loop template I've adjusted the marker code as given under:

[wpv-conditional if="( '[wpv-post-id item='@venue-location.parent']' ne '' )"]

[wpv-map-marker map_id='map-8' marker_id='marker-[wpv-post-id]' marker_field='wpcf-venue-location-address' marker_icon='<em><u>hidden link</u></em>;

[/wpv-conditional]

Where we are checking using conditional shortcode if there is parent post ID available, if its not available hense parent post is deleted then the condition will not get satisfy.

Can you please confirm it works as expected.

#2828430

That's great thank you Minesh. The map view now works as expected.

Do you think there is an underlying bug that needs to be resolved that when a post is deleted any repeatable groups within the post are also deleted? It seems like that data is left lying around with no way to then delete it.

Or should we go in and delete the venue locations within a venue before deleting the venue?

Best wishes and thank you for your help,
Lucy

#2828446

Minesh
Supporter

Languages: English (English )

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

No - its not error but yes, we can improve here.

For now, you may use any hook to delete the repeating field group item posts when you delete the parent posts or do it manually.

Please check the following ticket that may help you:
(please make full backup of your database before you go for any database operation):
- https://toolset.com/forums/topic/how-do-i-delete-repeatable-group-posts-if-they-do-not-appear-in-the-admin-area/#post-2351379

#2828902

That's great. Thank you for your excellent support as always.

Best wishes
Lucy