Skip Navigation

[Resolved] I’m having I’m having a problem dia problem displaying popup content on the map.

This thread is resolved. Here is a description of the problem and solution.

Problem:
When adding shortcodes to the marker's popup in the blocks editor, the editor freezes and we can't edit anymore.

Solution:
It was a bug that affected marker's popups in the blocks editor. It has been fixed starting from Toolset Maps 2.0.2.

Relevant Documentation:
https://toolset.com/errata/cannot-add-shortcodes-to-toolset-address-field-marker-popup/

This support ticket is created 3 years, 1 month 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+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by Jamal 2 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#1960519
5elementor.PNG
4.PNG
3.PNG
2.PNG
1a.PNG
0.PNG

Hello
I'm having a problem displaying popup content on the map.
Created in elementor a template that I insert into a toolset view.
Then select that view in the map pop-up editor.
Everything seems to be going well, and in fact the information appears on the map. But when I apply a filter in the search engine the pop-up is empty.
This happens if I have selected in the custom search "AJAX refresh ..."
If I select the option "Refresh full page on clicking Submit" it works fine, but I would like it to work also with "Refresh AJAX on changing any filter"

#1961263

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting the Toolset support.

It seems that the Elementor popup needs to be initialized using Javascript code. The first time the page loads, all the popups get initialized. The same happens when you deactivate AJAX. But when using AJAX, any popups that come from an AJAX call are not initialized.

Check this article on how to add custom JavaScript code to Views that use AJAX https://toolset.com/documentation/programmer-reference/adding-custom-javascript-code-to-views-that-use-ajax/

And check this online thread on how to initialize an Elementor popup https://stackoverflow.com/a/63531702

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

#1961837
3.PNG
2.PNG
1.PNG

Thanks for your reply
I have carefully read the two articles that you propose, but I do not understand how to solve the problem.
I don't know what code to insert or where to do it.
I am using a content template where I insert an item "elementor library" block with the content layout for the globe displayed on the map.
This I insert in the page the "map" block through the wizard within "pop up content" selecting the content template.
If you could give me directions I would be very grateful

regards

#1962327

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Would it be possible to allow me temporary access to your website and let me check it further? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Please let me know the URL on the frontend where I can see this issue.

#1962763

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Thank you for your feedback. I confirm the credentials are working for me. However, I am unable to edit the page and check the view and the map. The editor just gets stuck. This happens to me on different browsers. Check these screenshots hidden link hidden link

Can you build the Map and the view again on another page. But do not add the content template to the marker popup. Let me do it.

#1962853

Ahead. Yes, you can create another page and create the view.

Thanks!

(It also blocks me, it happens when content template is already added when map selection fails)

#1963979

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

First, I installed UpdraftPlus to make database backups during my testing, so I can revert my changes.

I created a new view inside this private page hidden link
As soon as I add the content template or the Elementor template inside the map's marker popup, the editor freezes. This is a known issue and our developers will address it in an upcoming release.
https://toolset.com/errata/cannot-add-shortcodes-to-toolset-address-field-marker-popup/

I found a workaround, but it can be applied on the existing page, because the editor freezes. You will need to build the page again from scratch.
The workaround is to not add markers from the Map block settings. It has to be added using a shortcode.
Check this screenshot, my map does not include the marker settings. hidden link
Then, we need to add the marker using a shortcode inside the "Fields & Text" block. You can use the Views button to generate the shortcode. Check this screenshot hidden link

[wpv-map-marker map_id='map-5' marker_id='marker-[wpv-post-id]' marker_field='wpcf-direcciones-de-la-entidad-y-mapa'][wpv-post-body view_template="GLOGO_PRUE1"][/wpv-map-marker]

Please note that:
- The map_id attribute should hold the same map's block ID. Check the ID(map-5) on the section title in my first screenshot hidden link
- If you use the Views shortcode, you won't be able to put a shortcode in the marker ID or in the popup content. You will have to manually edit the block and add the shortcode for the content template, and also add a shortcode to the marker_id attribute to make it unique.

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

#1970543

Hello
First of all, thank you for your dedication.

Unfortunately, the same thing keeps happening despite following the proposed steps.

When I apply a filter on the search, the popup is empty.
This keeps happening only with AJAX "
If I select the "Refresh full page on submit" option, it works fine.
I would like it to work with AJAX too

look at the page ... use the view you created with the html code.
As soon as you do a search or filter, the poup will stop showing up.

hidden link

#1970803

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

The modal popups open when you disable AJAX because Elementor's Javascript code initializes them. When you activate AJAX and perform a search or pagination, the newly loaded popups are not initialized, and they need it.

I searched online to find what Javascript code can initialize them, but I could not find any. You will need to ask the Elementor's support team for assistance. If they can provide a Javascript code to initialize the popups, I'll help you to implement it for AJAXified views. Otherwise, I remain helpless, and you'll need to deactivate AJAX on that view.

The old credentials are not working for me anymore. So, I am setting your next reply to be private to let you share credentials safely. However, without the help of Elementor's support team, I remain helpless.

#2125531

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I just want to let you know that this issue was fixed in last week's update. Let us know if you need any further assistance with Toolset.

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