Skip Navigation

[Resolved] Created two related posttimes, but they will not show unless both have content.

This support ticket is created 4 years, 11 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 11 replies, has 2 voices.

Last updated by Christian Cox 4 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1482977

That title should have read post types not posttimes. That is an odd example of auto correct for you.

I am trying to: Have two related but different custom post types have distinct views, but for some reason if I don't have data in both post types the views will not show the content. For example, we created a communities post type and an events post type. I am trying to display the communities in a view or archive, but if a community has NO linked event it does not show. I don't see any place where I would have made this a requirement. I literally want a page where people can see all communities and a page where people can go and see all events regardless of if they are actually linked or not.

Link to a page where the issue can be seen: hidden link

I expected to see: all Communities that have been published.

Instead, I got: Only the communities that have also have a related event.

I am hoping I just missed something as I was setting this up. In my view having a relationship should enhance the experience instead of making everything stop.

#1483231

I am trying to display the communities in a view or archive, but if a community has NO linked event it does not show.
Hi, unfortunately I'm not able to replicate this problem. I am looking at the View here: hidden link

I can see one of the results is the Christ the King 20-30 Somethings Community: hidden link

You can edit that Community here: hidden link

There is no related Event, yet the Community does appear in the initial results.

Also if I use the location filter to search within 30 miles of a known Atlanta address like 172 Powell St. SE in Cabbagetown, I see the same Community appear in results at this produced URL:
hidden link

So I must be misunderstanding something about this problem. Is there a specific configuration in the search filters I should be testing, or a specific address to test? Which Community is missing from the results?

#1483239

It is probably me not understanding something. I thought communities didn't appear unless they had an event, because one community that hadn't been appearing on the site appeared after I linked an event to it. None of that made sense to me, but I am still having a problem. I think it is in how I am setting up these distance filters. There are 11 Communities currently published. Only 7 of those appear on the Community page. I even set the mile limit to 100 which should cover everything in the site. Additionally, with no location imputed on the page shouldn't the site show everything available?

Does all that make sense. I am struggling with this project a bit. I was trying to copy parts of the Realtor demo site you have.

#1483449

It looks like the Distance Query Filter and the filter control were out of sync somehow, so I deleted both and recreated them. Now I can see all 9 published Communities appear when the page loads. Can you confirm?

#1483477

I'm still showing only 9 when there are 12 Published communities on the website. The site is in development mode so there is limited caching going on so I don't think that could be an issue. I created another view without any filtering or sorting and it shows everything. hidden link

The archive is set to not paginate so it should be showing more than 9 items if no address is provided, right?

I have had so much trouble with the distance feature.

#1483487
Screen Shot 2020-01-28 at 2.49.42 PM.png

I'm still showing only 9 when there are 12 Published communities on the website.
I see 12 now, screenshot attached. Is it possible there is a caching system of some kind on your server that is holding on to this page and the View results for a while?

#1483587

I can see all 12 now as well. I saw you editing different entries. Did you make a change or publish them again or something? I'm still trying to sort out why this is happening.

#1483589

I think I did republish one but not three. How are you populating address fields - are these imported, or are you using the location field in wp-admin to choose a location?

#1483619

If I understand your question correctly, the addresses where entered through the Toolset Form for Communities or from inside the wp-admin when creating an entry in the backend.

#1483623

Importing address information does not add those geocoded locations to the maps cache, so imported content often will not appear in distance-based searches until you visit those posts in wp-admin or show them in some other View without a distance filter. However in your case, this should not be an issue because the locations were selected in Forms or in wp-admin, which would trigger the geocoding and maps cache processes automatically for new content. So I don't have any other good ideas as to why some results did not show up immediately, other than some server-side caching mechanism like object caching, memcached, varnish, etc.

#1483743

Okay. I am going to pull what I created into standard block pages instead of being part of Elementor and see if that makes any difference moving forward. That is the only piece I can imagine could cause a delay. The site is not in caching mode because I have it in development mode. I do recall watching one of your videos that mentioned not using Toolset inside page builders to maintain comparability, but since that option is built into Elementor I didn't really think it would be a problem.

#1485181

Okay. I am going to pull what I created into standard block pages instead of being part of Elementor and see if that makes any difference moving forward. That is the only piece I can imagine could cause a delay.
Okay please do let me know what you find out.

When you are creating a new post using Forms or in wp-admin, you see the empty Address input field. As you type in the field (or paste), Google Maps begins showing a few possible matches below the text input. These autosuggest options update as you type. Do you choose an option from the autosuggested options, or do you simply type and then save? If you simply type and then save, it's possible the address is not geocoded. This means that the post would not appear in any View with a distance filter until you trigger that geocode event. One way to trigger that geocode event is to edit the post in wp-admin. Or if you already have the post editor open, refresh the page. This could be the source of a delay, depending on your workflow with the autosuggest feature.

I do recall watching one of your videos that mentioned not using Toolset inside page builders to maintain comparability, but since that option is built into Elementor I didn't really think it would be a problem.
Most of the time it's not a problem, but there are a couple of unresolved / won't fix issues directly related to Elementor:
https://toolset.com/errata/elementor-pro-template-shortcode-not-rendered-in-view-loop-item/
https://toolset.com/errata/elementor-library-widget-content-does-not-appear-on-the-front-end-for-posts-using-a-content-template/

There are also some known issues related to "split" Views, where you insert the filters and the results using separate shortcodes or separate Elementor widgets.
https://toolset.com/errata/toolset-maps-distance-search-location-input-cannot-be-used-when-the-views-is-displayed-in-split-mode/

Another known issue with distance calculations based on custom fields in related posts:
https://toolset.com/errata/maps-cannot-evaluate-the-distance-difference-if-they-are-being-compared-through-fields-in-connected-posts/