Skip Navigation

[Resolved] Maps block throws error in the WordPress editor

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 9 replies, has 3 voices.

Last updated by Arno 1 year, 11 months ago.

Assisted by: Waqar.

Author
Posts
#2355527

Hi,

While working on a different issue (https://toolset.com/forums/topic/display-grandparent-fields-in-a-map-marker/), the Maps blocks I am using in Content Templates stopped working. After opening the template, all I see is "This block has encountered an error and cannot be previewed". Also the settings menu of the block is empty so I can't make any changes to it.

This is the first error in the browser console:
Error 403 on requesting hidden link....
This file is requested by hidden link

I have created a staging site where the problem still exists with only Toolset plugins and the 2022 theme. I currently still have Wordfence and 2 Kadence plugins enabled because templates look very messy without them, but even if disabling those plugins the problem is still there. The template "Tmp Regions-Search-Regions" is an example.

Have 2 zipfiles containing a backup of the staging site. You can download it from our Google Drive if you let me know an e-mail address you want to access Drive with.

Thanks,
Arno

#2356071

Nigel
Supporter

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

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

Hi there

If the Map block has become corrupted somehow, it is unlikely that it can be recovered.

Rather than us downloading and installing duplicates, I suggest you first delete the Map block and replace it with a new one.

If that fails—you cannot add a Map block to the template—then we can get the copy of your site to try and understand why.

if that is the case, please let us know.

#2356505

Hi Nigel,

I just tried:
- I added another map block, but it immediately results in the same issue.
- I removed the map block with the issue, saved the template, and then added a new map block: same result.
- I created a new template with a map block, that worked. I hoped that would "trigger something" and solve the issue in the other templates, but it did not.

What else can I try? I have no clue what could have caused this.

I did not check all the templates yet, but so far I noticed that the issue only occurs on templates not assigned to post types/taxonomies. On templates assigned to a post type (Single), the map block seems fine. Although on one of these templates the browser console does show this error: "Uncaught ReferenceError: OverlappingMarkerSpiderfier is not defined". The map block works though, and I can access its settings.

Does this tell you something perhaps?

Thanks,
Arno

#2356913

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Arno,

Thank you for sharing the update and we'll need the clone/snapshot of the website, for further investigation.

I'm setting your next reply as private so that you can share the link to the Google Drive folder with the website's backup files.
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

regards,
Waqar

#2359053

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the permission and I also managed to download the website's clone using the Duplicator Pro plugin.

I'll be performing some tests on this clone and will share the findings, as soon as this testing completes.

Thank you for your patience.

#2359945

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for waiting.

During troubleshooting, I noticed that those content template errors only appear, when the no page/post is selected in the "View with:" field at the top, to use for the preview's source.
( example screenshot: hidden link )

If you'll select the page/post that you plan to use with that content template, the content template can be edited without any errors.

#2359999

Hi Waqar,

I'm so happy that you found that!

Originally, the map block did not load, and the browser console threw an error like this:
GET hidden link.... 403

After selecting a post in "View with:" and publishing and re-opening the template, the map loads again! I do still have this error in the console:
"Uncaught ReferenceError: OverlappingMarkerSpiderfier is not defined at WPViews.ViewAddonMaps.self.init_map (hidden link)...."
Do you see that too?

#2360777

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update and glad I could help.

I don't see this error on your website's clone and in the "Tmp Regions-Search-Regions" content template on your staging website, no page/post is selected in the "View with:" field.

Are you experiencing this on the live website? If yes, please temporary admin login details for that website along with the name of the content template where this error can be seen. I'll try to reproduce this error on the website's clone, accordingly.

Note: Your next reply will be private and though no changes will be made on your live website, it is recommended to make a complete backup copy, before sharing the access details.

#2361607

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details.

I've done some further testing and research and that error only shows on the editor screen when the "Spiderfy overlapping markers" option is enabled in the map block's settings and there are no map markers available in the editor's map preview.
( screenshot: hidden link )

The error is safe to ignore and it doesn't affect the content template's output on the front end or the editing on the back end.

#2361757

I love problems that are safe to ignore 🙂

Indeed I use the Spiderfy markers option, and there are no markers because they will be created dynamically by a view.

Let's close this ticket. Thanks for your help Waqar!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.