Skip Navigation

[Resolved] Block editor map/view filter results not correct

This support ticket is created 5 years, 3 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 13 replies, has 2 voices.

Last updated by Beda 5 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#1384551

When I filter the view by province, then click on a map marker, the pop-up appears on a different marker. Got this advice from FB group:
If you open the js section in the Search and Pagination section of a view, you'll see a list of js events that views/maps raises on the front-end. If you have some custom js running on your map, you can add a listener for appropriate event.

But I have no idea what this means.

hidden link

#1384809

It depends if your pop up is a custom code or just the native Toolset Maps PopUp offered when you insert markers.

If it's custom code, then it means that you use JS to fire a PopUp that needs to be re-initiated after the AJAX search updates the results.
With that we cannot help, because it is custom code - you could however fire your custom code again in those mentioned "front-end Events" that we offer in the JS Editor of the Search and Pagination section.

But it could be you mean the native Toolset PopUp that we offer when you insert a marker.
I am actually pretty sure it's the native one, because I can see it working well on the link you provided - until you filter - then the popup targets another marker.
I also see you built that with the Blocks plugin, so it's unlikely you used Custom PopUps.

I cannot confirm this issue on my own test sites with relatively complex maps that use such marker pop ups.
There, even using an AJAX updated search, the PopUp always appears at the right location.
This would mean the issue is only replicable on your site, or maybe I miss a step, OR, more likely, it's because my own online sites do not yet use Blocks (and will not, because they where built in older versions with features I cannot yet migrate to current blocks)
Locally, even with latest Blocks modes, I cannot replicate the issue you and me see on your site neither.
The popUps work great even if clustered and spiderfyed.

With Blocks, the approach is different than the "old" way, which Facebook User (XY) suggested you as well, but since native features seem used here, it should work on your site just as well as on mine.
I see the Blocks on your site have some issues as well, it says "this block contains unexpected content or invalid content" and asks to Convert or Resolve

In all honesty, I do not want you to do that, because I do not know what it cause and what will happen. This might be due to the beta state of the Blocks plugin, it might be due to wrong content, or anything else.
I need first to analyze this and ask our Developers what the intention is.

Also, doing so I will have a chance to actually check on the issue you mention, which I suspect to be an actual bug in BLOCKS, but not in the classic Views Maps.
So - what I suggest is, if you can, provide me with a copy of this site?
You can use Duplicator Plugin as explained here https://toolset.com/faq/provide-supporters-copy-site/

Then I can deploy that locally, and also send it to the developers for deeper analysis If needed, or provide you the proper solution here.

I activated a private reply, so you can add the data safely.
I prefer to not analyze this on your online site because it will require anyway some local debugging, and it's safer as well (I will not have to alter your online site)

Can you provide me that so I can deeper analyze this?

#1384977
#1386425

Hi - just wondering how this is coming along? Thanks

#1386687

I'm with you in short, I was on weekend, and am now analyzing this all from the escalated queue.
Unfortunately no other 2nd Tier was enabled to look at this earlier.

#1386907

I replicated the BUG and will inform the Developers now

The only solution to it seems to head to the page where you added the View, and then changing the Search settings from "AJAX refresh when changing any filter" to "Full page refresh when clicking Submit".

You will also have to add a Submit Button in this case as the search won't fire automatically with AJAX.

I will keep you updated here about the bug solution.

#1386957

Oh, and in the View that you created you will see the Search Block says “This block contains unexpeted content or invalid content > Convert/Resolve".
Please do neither of that.
Instead delete the block and add a New Search with AJAX submit features.

That will not resolve the issue you reported but it will at least fix that single block which seems corrupted.

Thank you!

#1394987

Is this problem going to be resolved? I kind of need this feature to work. If it doesn't work, I need to work on finding another solution. Please advise.

#1395109

It is going to be resolved, but I have no control over when or how soon.
It will most likely not be resolved in the first stable release, because there is no work done on the issue yet.

I have pushed the DEV to look at this again, however, the first release (currently in "Release Candidate" status internally being tested) has shown other, breaking issues that needed attention first.

I will keep you updated on any development made.

#1397209

I'll leave it as is right now and patiently wait for the fix to be released.

#1399631

The imminent release will hold this fix.
It should happen today or this week.

I'll let you know here.

#1400059

Great - thank you.

#1403975

This is now released, please let me know if you can also confirm the fix.

#1404737

Thanks Beda.

Do I have to create the blocks view again? I updated the Types plugin and added the blocks plugin but doesn't seem to have affected anything.

Thank you.

#1405207

The only reason I could imagine is a cached version of older scripts.
Can you try a few things like:
- re-save the View after some changes
- re-save the page where it's used on
- empty eventual cache's or purge cache if such features are enabled on your site by some caching software

I had tested the adjustments as well personally on the issue replicate and was able to confirm it resolved.
If none of the above helps, I will have to take another look at probably a new duplicate, but lets first make sure it is not a cache issue.