Skip Navigation

[Resolved] Inconsistent Anomaly on View

This support ticket is created 4 years 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)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by keithT-3 4 years ago.

Assisted by: Christian Cox.

Author
Posts
#1585689

Tell us what you are trying to do?
There should be a view with introductory text based on the country. It is working on some queries but not on others. I have not been able to find out why that is.

Works on:
hidden link
hidden link
hidden link

Not working on (the intro paragraph and H2 not showing up, which are part of the first view)
hidden link
hidden link

#1586007

Hello, can you please share the following information?
- Copy + paste the contents of the View's Loop Editor here for me to review
- Open the Query Filter panel, expand all the filters, and take screenshots showing every filter's configurations. Please include this with your next reply.
- If any Loop Templates are used, please copy + paste the code from those templates here for me to review. I'll take a look at everything and give you some feedback.

#1586039
Screen Shot 2020-04-14 at 2.57.46 PM.png

Here is the loop, below.

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
<h2>[types field='country'][/types]</h2>

<wpv-loop>
  
		[wpv-post-body view_template="loop-item-in-provider-international-country-query"]
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<!-- [wpml-string context="wpv-views"]Sorry, no providers in this country yet. <a href="<em><u>hidden link</u></em>" >Click here</a> to submit to be a provider for women in this country.[/wpml-string] -->
	[/wpv-no-items-found]
[wpv-layout-end]

Loop template below:

<p>Below you will find group(s) willing to fill orders for people in [types field='country'][/types][wpv-conditional if="( $(wpcf-country) eq 'Cyprus' )"], Turkey, or Greece[/wpv-conditional]. Please contact them directly to order your breast forms. They should follow up with you with more information about your order. If you have questions or do not get your order filled in a reasonable amount of time (4 weeks or so) contact us at <a href="mailto:orders@knittedknocker.org" >orders@knittedknocker.org</a> to request us to fill your order from the US.</p>

<h2>[types field='country'][/types][wpv-conditional if="( $(wpcf-country) eq 'Cyprus' )"], Turkey, or Greece[/wpv-conditional]</h2>
#1586939

Okay so I see the "Sorry, no providers in this country yet." message in the first View has been commented out:

<!-- [wpml-string context="wpv-views"]Sorry, no providers in this country yet. <a href="<em><u>hidden link</u></em>" >Click here</a> to submit to be a provider for women in this country.[/wpml-string] -->
    [/wpv-no-items-found]
[wpv-layout-end]

That's why nothing appears for country=france. It would seem that there are no matching results for the country "france". If there are matching results in wp-admin but they don't show up in the View, that could be related to the Ordering settings for this View. For example, if you are ordering by a different custom field, but the france country post does not have a value for that custom field, it will not appear in the results. Is this possibly the problem?

If that doesn't appear to be the case, we should try to determine why matching "france" posts are not shown in this View.
- Please temporarily deactivate all plugins except Types and Views, and activate a default theme like Twenty Twenty
- If you cannot see this View, place it directly on some custom Page and test it there.
- If the results are correct, reactivate your theme and other plugins one by one until the problem returns
- If the results are not correct, I'll need to take a closer look

#1586955

My issue is resolved now. Thank you! Your response caused me to look closer at what was going on. And I noticed that the "country" field I was pulling query was correct, but it was not correct in the loop template. I changed it to pull from the correct custom field. Sorry I didn't notice this previously, and I appreciate your help and extra set of eyes.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.