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"
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.
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
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.
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.
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)
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.
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
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.
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.