I am trying to: Filter the second view by querying user's location
Link to a page where the issue can be seen: hidden link
I expected to see: The second view (filtered by location) filtering results between ALL stores instead of comparing the radio distance between looped items only.
Instead, I got: Unreasonably the first main view (filtered by search) it's duplicated after giving location permission and the page reload. Furthermore the second view is only listing as results the posts that are included in the loop above, rather then comparing the radio distance between all the stores (posts in the post_type Dealers).
So: how can i resolve first the duplication error on the first view, and then correct the query filter in the second view?
PS: I know that all posts should be looped in the page, and this is! We've already included an hidden view that loop markups. You can check as they all appear on the first map at the opening of the page. So i can't explain why the second view doesn't catch them.
Hi, I will try to help but I do not understand completely. I need some more information:
- Please show screenshots of both Views in wp-admin so I can see how the Query Filters and Filter Controls are configured.
- Please tell me how the Views are added to your site. If you have used shortcodes, please copy + paste those shortcodes here and tell me where you inserted them.
- What does "ubication page reload" mean? Is this a typo of "location", or something else I do not understand?
- I do not understand what this means: "We've already included an hidden view that loop markups." Can you explain this in more detail?
Hi Christian, thanks for helping.
So here you have two screenshot. The first for the Visual Composer page that includes shortcodes for views and maps. The second is the list of the views included/shown in the /where-to-buy page.
For "We've already included an hidden view that loop markups." i mean that we've created the "Where to buy - Hidden Markup Complete List" view just for displaying markups on the first map, the one that appear when the "wpv_conditional" shortcode show it, if the user still doesn't submitted a search (you can see that in the first screenshot).
Code of the hidden view:
[wpv-map-marker map_id="map-wheretobuy-all" marker_id="marker-[wpv-post-id]" marker_field="wpcf-dealer_address"][/wpv-map-marker]
The other two views are nothing else then post listings in three bootstrap columns with custom fields. Maybe is better if you connect to the admin panel, we shared access the past week, we should still have the user for you.
Ah i forgot, in the VC you will see a third view called NEAREST that is shown only if the input City is submitted. But it doesn't matter at the moment, just for understand.
Hi, I spent some time trying to isolate the problem but it's a bit tricky. I've been able to replicate this on my own local environment in one specific case. It's not exactly the same setup as yours (I only have two Views on the page, and the distance filter is on the first View only), but the filters are duplicated when the User Location is determined so I believe it's the same root issue. I have enough to report this to my 2nd tier support team so they can do some additional investigation. Please stand by and I will update you as soon as I have more information to share.
Yep i opened the ticket cause i really know that is a interior bug that you (toolset team) have to fix. Cause the configuration is perfect. Before i thought that was a problem caused by AJAX but that's happening with page reload too.
Hi, any news? Please it's about one week and three ticked that i try to figure out that problem. All is ok, but we need to accomplish our customer expectation as soon as possible. Maybe there is a way to avoid this problem and do that in another form? Thanks you guys!
I don't have any new information to share yet. My second tier support team was able to confirm the problem exists, but we are continuing to investigate. As a temporary solution, you could remove the User Location from the distance filter and use a fixed position instead. This would prevent the problem where your View's search filters are being duplicated, but it does not allow you to have true distance filtering. I will update you as soon as I have more information to share.
Hi again.
Please keep in mind the second point of the issue: the view just includes by proximity a subset of items, filtered by the first view, instead of using ALL items. Thanks again!
Okay thanks, I have created another ticket where we will discuss issue #2 separately from the duplicated filters. We try to limit each ticket to a single issue. Here's the new ticket:
https://toolset.com/forums/topic/split-first-view-filters-applied-to-second-view-on-page/
Our developers have informed me that this issue will be resolved in Maps 1.7. I don't have a release date available yet, but I'll keep you posted here as I receive more information.
Hi, Maps 1.7 has been released and is now available for download or automatic update. Please update to the latest version of all Toolset plugins and let me know if the problem is not completely resolved. Thanks!