Skip Navigation

[Resolved] View will not display RFG records

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by ericE-4 4 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1491305
image1.jpg

I have a custom post type "Lodge" which includes a a RFG called "Species" and a RFG called "Package".

I have view "edit-lodge-details-page", which displays a form for editing the a Lodge post and displaying other views. One the other views that is displayed inside that view is "edit-packages-lodge-details-page".

The view "edit-packages-lodge-details-page" is configured for "Package" RFGs, and the Query filter is set to select items from Package groups as related items of the current post in the loop. See (image1.jpg)

The loop editor of this view is as follows:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
      <wpv-loop>
        <div class="package-item">
          [wpv-view name="edit-package-details-lodge-details-page"]
          <div class="rfg-delete">[cred_delete_post_link post="[wpv-post-id]" text="Delete this package" action="delete" class="cred-refresh-after-delete"]</div>
		  <hr>
        </div>
      </wpv-loop>
    [cred_form form='add-package-lodge-details-page' post="[wpv-post-id]"]
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No packages found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

When I view a post with the "edit-lodge-details-page" view, everything in that view is as it should be. However, when it displays the "edit-packages-lodge-details-page" view, it will only output "No packages found".

What's especially strange is that "edit-lodge-details-page" view includes another sub-view called "edit-species-lodge-details-page". This other view is configured exactly the same as the "edit-packages-lodge-details-page" view (it's configured for "Species" RFGs, and the Query filter is set to select items from Species groups as related items of the current post in the loop). It outputs information exactly as expected however.

I can see no obvious reason why this happening. Can you shed some light?

To see a post with the "edit-lodge-details-page" view, login (see below) then go to page hidden link

#1491547

Hello,

Please edit the post view "Edit Packages (Lodge Details Page)":
hidden link
in section "Ordering", you are using option: order by "Field Price", that means all results need to setup value in field "Price", this is a limitation of WordPress WP_Query, see the document:
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
‘meta_value‘ – Note that a ‘meta_key=keyname‘ must also be present in the query.

You might consider to change it to: order by post title/date.

#1491553

My issue is resolved now. Thank you!