Skip Navigation

[Resolved] VIEW BLOCK OUTPUT DOES NOT INCLUDE CUSTOM POST INTERMEDIARY VALUES

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/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by elizabethO-2 1 year, 7 months ago.

Assisted by: Waqar.

Author
Posts
#2618657

Tell us what you are trying to do?

The relationship is Event - Site Group Intermediary - Site; I want to make a query of Sites associated with the Event, but the type of site is stored in the site group intermediary relationship. When i FILTER the query for that information, the view fails (no values are returned) [see Template for Event 2; two views at the bottom each view trying to identify either sites that are Places to Visit [Is Place to Visit] or Filming Location [Is Filming Location]; both of these values are stored in the intermediary record.

A view for an Event that returns all related sites allows me to access the site information but does not allow me access to the site group intermediary information. When I choose site group intermediary information, I get all sites. How do i get both the site info and intermediary info since the relationship between the event and site is stored in the intermediary record?

Is there any documentation that you are following?

No, your documentation is extremely limited; it does not explain what data is available in a VIEW BLOCK content selection when you select a custom post type. For example, if I select only related Sites, then only site data is available and the parent event and intermediary data is not available in the VIEW BLOCK content selection. I know it is not available because all references to them fail [no results returned].

Is there a similar example that we can see? Template for Event 2 ; Choose Griffith Park and Observatory event and there should be 6 sites listed as places to visit; choose VOY: S3 E8 event and you should see 1 filming location. Right now, both sections show the same values because i can't select content based on the site intermediary flags (Is Filming Location or Is Place to Visit).

What is the link to your site? hidden link

#2618981

Hi,

Thank you for contacting us and I'd be happy to assist.

In the content template 'Template for Events 2', there are two views, both of which were set to show the 'Sites' post type.

Since you need to filter their results based on the custom fields 'Is Film Location' and 'Is Place To Visit', you'll need to change the post type to intermediary 'Sites Group Intermediary Posts'. This is because these custom field values are saved with this post type.

I've made the following changes in these two views and they are showing the results correctly now.

a). in the content selection settings, I selected 'Sites Group Intermediary Posts' post type, instead of 'Sites'.

b). added the relationship query filter so that only the related intermediary posts are shown.

c). added a custom field query filter in both views, so that they show only the results where the 'Is Film Location' and 'Is Place To Visit' field values are set to 'TRUE'.
Screenshot View 1: hidden link
Screenshot View 2: hidden link

d). In the image block's settings, changed the post's source to related 'Sites' and then selected the 'Site Photo' field.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2619191
Screenshot 2023-06-26 142832.png

Thanks, that works well for the two views at the end. However, this is the Template for Events 2 and the first blocks are values taken from the current event. If I set the content template to Intermediary, then i lose the ability to display the current event fields at the top of the page (see image).

---- Never mind, I figured it out. The trick is that for each of the views, there has to be a result set in order to be able to select the dynamic reference and fields. Without a value, it only lets you select the Event information. When I switch the event to another record (at the top "show on front end") that has data to display, then all of the options are available. This is sooooo confusing. It should be possible to setup the view and fields even with no result set, since what comes first the data or the page? This forces me to create the data just to be able to build the page.

Example: Griffith Park & Observatory has Places to Visit, TOS: S2 E19 A Private Little War has Filming Locations. Neither one has both. So to build the views I have to have one or the other record selected to edit the view that applies, otherwise I cannot edit. Can you see how this is confusing?

One issue, the editor screen bounces around adjusting itself so much that it gets in the way of actually doing the work. I have to wait for it to stop bouncing before I can choose the drop-down value i want. This is really annoying and wastes time.

thanks.

#2619319

Thanks for the update and glad that it works.

> However, this is the Template for Events 2 and the first blocks are values taken from the current event. If I set the content template to Intermediary, then i lose the ability to display the current event fields at the top of the page

- The content template's assignment stays the same and it should continue to be used for the 'Events' post type.
( screenshot: hidden link )

My comments about the intermediary post-type selection were about the two views used in that template.
( screenshot: hidden link )

> When I switch the event to another record (at the top "show on front end") that has data to display, then all of the options are available. This is sooooo confusing. It should be possible to setup the view and fields even with no result set, since what comes first the data or the page? This forces me to create the data just to be able to build the page.

- Your observation is correct and currently, a related post needs to exist for the selected preview post, for all the correct dynamic source options to become available.

We have an internal ticket to improve this behavior in future releases, but it won't be possible to share any time estimate at the moment.

For now, a workaround can be to create a test/demo event post, where all fields have data and a related post, and keep it selected as the preview post.

> One issue, the editor screen bounces around adjusting itself so much that it gets in the way of actually doing the work. I have to wait for it to stop bouncing before I can choose the drop-down value i want. This is really annoying and wastes time.

- The way WordPress blocks-based editor Gutenberg ( ref: https://wordpress.org/gutenberg/ ) works, it tries to create a live preview of the actual content that is shown on the front end.

As the content is being loaded and rendered in the editor, you'll notice some delay in which the loading completes and elements are settled in their places. And the more complex and long this content is, the more time it needs to completely load. This is why you see the bouncing or shifting of the content, while the loading in underway.

#2619513

My issue is resolved now. Thank you!