Skip Navigation

[Resolved] Can't edit Map block

This support ticket is created 3 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 – 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: Africa/Casablanca (GMT+01:00)

This topic contains 8 replies, has 2 voices.

Last updated by Jamal 3 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2064415

Tell us what you are trying to do?
Make changes to the Map block hover and click marker "hints"
Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
hidden link

I don't know when it stopped working. We use DIVI and Toolset types/forms/blocks/maps (can't use access. if I install access it breaks the site) and paid memberships pro. Everything is at the latest versions. PHP is 7.4.16 - I've seen others discuss this issue but none of the fixes worked. I've turned off enqueue google maps in divi settings. I've deactivated all plugins but for toolset and changed theme to 2021 and the problem still persists. It views correctly on the front end but when I edit the page and click on the map block, the map disappears and the message "the block has encountered an error and can't be viewed" - There are no errors in the website logs.

I looked in the DB to see if I could manually update the hints but I am not finding it. I opened what I thought was the published page and it just had 3 shortcodes. I didn't see any reference to the map (so it's probably a revision and not the live page - still looking).

#2064993

Hello and thank you for contacting the Toolset support.

It seems that the map block has been corrupted. I would suggest removing it and building it again.

Please note that we have a known issue with using shortcodes inside the marker's popup.
https://toolset.com/errata/cannot-add-shortcodes-to-toolset-address-field-marker-popup/

I hope this helps. Let me know if you have any questions.

#2065063

I've tried this already. I also tried adding a map block to a new page. It fails the same.

#2065081

Would you allow me temporary access to check this closer? It is preferable to see that on a staging site that presents the issue instead of the live site, so I can run tests without impacting the live users(switch themes, plugins, etc.)

Please provide a URL where I can see the issue. Or the steps to follow to reproduce it.

Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2065429

Thank you for the staging site, I confirm the credentials are working. However, I still need to know where can I see this issue?

I tried editing a couple of views, and this is the only one that has a map inside of it:
- hidden link
Please let me know if it is the case or not?

I added a new map to the view and it worked without issues, then, I tried to add markers and it also worked. Once, I started customizing the markers, issues start to arise. First, I am not able to save the page with my new customizations. Then, I tried to reload the page editor and it crashes. Check this screenshot hidden link

I installed the File Manager plugin to activate PHP debugging and check the debug logs file, the error was an execution time error. Check this screenshot hidden link

Increasing the memory limit from the configuration file did not help to fix this issue. I have also switched the theme and plugins, but it did not help either. I will need to take a copy of the website and debug it locally. Would you allow me that?

#2065645

Yes, you can copy the site and debug locally.

The page that has the map we can't edit is search properties on the menu which is hidden link as you found above. The critical errors you showed screenshots of is new. It's good we did this on a staging site.

#2066467

I could not find the cause of the issue, and I am reaching out to the team to find out why. However, I was able to recover the page and rebuild the map.

I, actually, commented on some lines in the Toolset Maps plugin, but you could just disable it for a couple of minutes until we can remove the erroneous Map block. Then, activate the plugin again.
Add a new map block, but do not add any marker to it. Check this screenshot hidden link

Then, we'll add the marker using shortcodes inside a Fields&Text block. Go inside the view's loop and add a new Fields&Text block. Then add the following code to it:

[wpv-map-marker map_id='map-14' marker_id='marker-id' marker_field='wpcf-address']

[wpv-post-id] - [wpv-post-link]

[types field='address'][/types]

[/wpv-map-marker]

Updated the map_id with your actual map_id. Check this screenshot hidden link

To customize the marker popup, edit the content of the wpv-map-maarker. Edit what is between [wpv-map-marker ...] and [/wpv-map-marker]

If you need to customize the title that appears onhover of the marker, add the marker_title attribute to the wpv-map-marker. For example, to use a custom field:

[wpv-map-marker map_id='map-14' marker_id='marker-id' marker_field='wpcf-address' marker_title="[types field='custom-field'][/types]"]

Read more about the marker shortcode here https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker

#2066555

Ok, I think this workaround is going to work, however, how do I get an image in the hint and hover?

I tried:

[wpv-map-marker map_id='map-14' marker_id='marker-id' marker_field='wpcf-address' marker_title="[types field='property-featured-image'][/types]"]

[types field='property-featured-image'][/types]<br>
[wpv-post-id] - [wpv-post-link]<br>
[types field='address'][/types]

[/wpv-map-marker]

On the hover it's just the url for the image and in the body it isn't showing the image at all. When I inspect, it looks like the types field for the image expands to hidden link

#2066627

I don't think that Google Maps API accepts an image in the marker title. It only accepts text. That's why it displays the HTML markup for the image, because it treats it as text, instead of as HTML.

Regarding the content of the marker popup, it should work. However, the issue caused by the image in the marker_title has caused that too. I removed the image from the marker title, and now the image appears on the marker's popup. However, you may want to display a resized image instead of the full-size one. When adding the shortcode using the Toolset button, you can choose a resized image or customized size for the image.