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