[Resolved] Formatting Pop-up content on Map in Blocks not possible?
This support ticket is created 4 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I want to create interactive maps with pins, based on custom search and filters, with pop-up content that makes sense (and is readable).
Using the WP 2020 theme, I thought it would be a good idea to give Toolset Blocks a try. Maybe that was a bad idea and I should have stayed with the "conventional" views, but since Blocks is said to be the future…
As soon as I start adding the pop up content to my pins with formatting (because the standard color would be nearly-white text which noone can read) and conditionals (in order to prevent empty lines), everything is getting suuuuuuper sloooooooow and literally freezes.
Second, it seems impossible to add filters to the displayed pin maps without adding a view loop with the results listed as list - is this correct?
I am following the tutorial on maps with blocks + my knowledge of Views, which seems somehow going into a wrong direction.
Is there a workaround using the Blocks editor or is Blocks simply not made for stuff that goes beyond straight displaying content elements? (like my strongertogether.ch/maps-view under construction)
Toolset blocks is essentially the same as our views plugin. The only difference is that the blocks plugin comes with the block editor enabled by default, which can be changed in the settings.
As soon as I start adding the pop up content to my pins with formatting (because the standard color would be nearly-white text which noone can read) and conditionals (in order to prevent empty lines), everything is getting suuuuuuper sloooooooow and literally freezes.
For this I would need to log into the site and check to see what may be occurring. Are there any other plugins enabled besides toolset ? If so could you temporarily disable all the non-toolset plugins and check again.
Second, it seems impossible to add filters to the displayed pin maps without adding a view loop with the results listed as list - is this correct?
You will still need to add a view loop because the map data would be coming from the view loop. This means that you still need to add the marker data for the map.
Is there a workaround using the Blocks editor or is Blocks simply not made for stuff that goes beyond straight displaying content elements?
The block editor is essentially using the gutenburg editor to visually allow a user to customize their content with minimal to no html/css knowledge.
Anything that goes beyond that you would need to use the classic editor that allows for more freedom. Though you can use a combination of the classic editor to build your view.
1. I have temporarily disabled the non-Toolset plugins, but the speeee issuuuuueeeee still remains.
2. This sounds promising, e.g. to prepare a content template in classic mode and then apply it in a block, or in the pop-up content of the map. But when I start a new content template it looks like i'm stuck with the Block editor, I couldn't find the switch to the classic mode (though I have classic editor plugin installed and active, and actiated the "allow users to select the editor" is switched on)?
Hence I'm somehow stuck, I can neither add my content directly in the pop-up field editor, nor manage to prepare the desired content as a content templage… or is there a tutorial for such cases, which I missed to find?
1. I have temporarily disabled the non-Toolset plugins, but the speeee issuuuuueeeee still remains.
Would you mind allowing me to have the login for the site so that I can grab a copy of the site to see if the slowdown still occurs here on my end ?
But when I start a new content template it looks like i'm stuck with the Block editor, I couldn't find the switch to the classic mode
If this is happening then you can go to Toolset -> Settings -> Editing Experience and enable the setting " Show both the legacy and Blocks interface and let me choose which to use for each item I build"
Under this you should see the the setting for "Editor to use for Content Templates" select the classic editor.
I've enabled the private fields so that I can have a look at the slowdown issue. Please also send the link for the exact page with the issue as well.
It looks like I'm running out of ' and " for my queries… or is this just a display issue in the editor, while the code will be correctly resolved with the opening and closing " ' "" ' "?
I must admit that I've never fully understood whether
if="( '[types field="phone"][/types]' ne '' )" and if="( $(wpcf-phone) ne '' )"
can be used both no matter what or whether one or the other is only allowed in particular context?
It seems that the account that you provided is not an admin account.
Could you update this for me because i'm not able to see the issue with this account.
Also regarding the the quotations issue you can nest the single quotes
This syntax below is legal
if="( '[types field='phone'][/types]' ne '' )"
Also both syntax here are also legal
if="( '[types field="phone"][/types]' ne '' )" and if="( $(wpcf-phone) ne '' )"
Usually you will use this version if="( '[types field="phone"][/types]' ne '' )" when you are using non-types custom fields as you can use the shortcode.
Only types fields can be used in this format if="( $(wpcf-phone) ne '' )"
I have rebuilt the map page one more time, and checked after every step. Indeed, as soon as I add the first [wpv-conditional] to the popup, that was it. The page is slowed down and I cannot do anything (except close the window).
Since I have several fields that may be filled or may be empty, I need the conditionals to get a popup text that looks ok :-S
I will be very grateful if you have an idea how this can be resolved! Thank you, Claudius
…and a question I think is probably a silly one but I cannot find the solution anywhere: How can I duplicate a View made with Blocks in order to not start from scratch but use and adopt an existing View?
(yes, formerly this was possible with duplicate post, but now this doesn't work any more)
Until now, I thought I had found the function that made the page sloooowdown - the conditional in the map pin popup text.
But now I created another page with map and View, hidden link, similar to the other one, no conditionals in the map pin popup, but as soon as I entered the popup text code, this one also slowed down and is not responding any more (except in classic editor mode, which is literally unreadable to work on)
This is really driving me crazy :-S
So I'm hoping that you figure out what makes the page break (and how to resolve)
Claudius
Sure when you add your existing block view to a new page you should be able to create it as a copy. See Screenshot
So you can edit it as the original view or as a copy.
Secondly would you mind if I grabbed a copy of your site for further testing as it seems to be a case where the number of posts is causing the view to slow down.
I just got blocked by the webhost for the 2nd time within 48 hours, my Wifi IP got added to the Anti-DDoS list. Looking at the log together with the hosting provider's support, it seems that there is an issue with the permissions, leading to tons of (denied) requests in the background :-S
this morning, even when I was not working on the site but just had my computer running with the site open on some tabs in the background, it generates piles of requests (several per second) in the log like these two types: (xxx.xxx.xxx.xxx refers to my Wifi's external IP)
xxx.xxx.xxx.xxx - - [07/Apr/2020:07:17:46 +0200] "GET /wp-json/toolset-dynamic-sources/v1/dynamic-sources?post-type=delivery&preview-post-id=403&_locale=user HTTP/2.0" 403 116 "hidden link" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:74.0) Gecko/20100101 Firefox/74.0"
xxx.xxx.xxx.xxx - - [07/Apr/2020:07:17:44 +0200] "GET /wp-admin/admin-ajax.php?action=rest-nonce HTTP/2.0" 200 42 "hidden link" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:74.0) Gecko/20100101 Firefox/74.0"
What is wrong here? Do you need my debug info file?