Saltar navegación

[Resuelto] Repeating field groups not displaying regardless of conditions

This support ticket is created hace 1 año, 7 meses. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Este tema contiene 9 respuestas, tiene 2 mensajes.

Última actualización por joshM-4 hace 1 año, 7 meses.

Asistido por: Minesh.

Autor
Mensajes
#2605641

Tell us what you are trying to do? Display the repeating field groups of the "day schedule" and "session details" on their respective "Event" post. "Session details" is set within the "day schedule" repeating field group.

I had this set up and it was working in my local environment but when I went live it stopped working. I tried changing the conditional parameters for the view but nothing fixed it. Right now the "day schedule" view is set to display based on the post where the view is, with the "session details" view set to display based on the current post in the loop (and is placed within the "day schedule" loop). When I choose to make the "day schedule" display based on it's specific relationship it doesn't fix it.

Here's an event page where it should be showing the schedule details (click on the "Event Schedule" accordion to see) enlace oculto

The post field group is here: enlace oculto
The "Session details" view is here (this view is inside the loop of the "day schedule" view): enlace oculto
The "Day schedule" view is here: enlace oculto

#2606249

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details and let me check whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2606493

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

I can see with your edit event post:
- enlace oculto

There is no entry available with the repeating field group "Day Schedule". What if you try to add few repeating field group items for this group and then check if its working or not.

#2606499

Hi Minesh,

Not sure what happened—I had entries present for those field groups when I cloned the site to this staging environment. I just added some entries and as you'll find, it's still not working. I have tried every combination of query filters that make sense to me.

I spent an hour trying to make it work before contacting support, so please take a look again. I'm sure I'm missing something simple, but it's not from a lack of effort.

#2606523

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

I would like to know using what content template you are trying to display the singe event post?

As I can see I do not see any single content template assigned to event post type:
- enlace oculto

#2606527
Screenshot 2023-05-15 at 8.38.07 AM.png

I'm using the Cornerstone builder in the Pro theme by Themeco to manage most of the CPT templates. You can see that one specifically by going here: enlace oculto

Once you're in that edit screen you'll need to choose the event you want to preview by clicking the ext link icon in the upper right corner, filter by event post type, and then choose the specific event. (see screenshot).

To view the contents of any element, just click on it and drill down to where you need. Let me know if you need anything else.

#2606541

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Can you please tell me how exactly you added the view as I do not able to locate the view on edit template screen?

#2606547

Sure thing. If you scroll down to the accordion that says "Event Schedule" and click on it, the sidebar context will change and you'll see a content box in the sidebar that says, "click to edit". Click on that and it will open up a modal where the view is embedded.

This 20 second video I made shows that process if you find that helpful: enlace oculto

#2606567

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

I can see that you've added the following custom view filter to your theme's functions.php file:

function tssupp_filter_event_query( $view_args, $view_settings, $view_id ){
   
  if ( in_array( $view_id, array( 468,482,485,514,1638,1652 ) ) ) { // Edit view IDs (see view URL in WP Dashboard) e.g. ( 468,469 )
   
    if ( ! isset( $view_args['meta_query'] ) ) {
      
      $view_args['meta_query'] = array();
    }
      
    $meta_query = array(
      
      'key'     =>  '_EventEndDate',
      'value'   =>  date("Y-m-d H:i:s"),
      'type'    =>  'NUMBER',
      'compare' =>  '>'
    );
      
    $view_args['meta_query'][] = $meta_query;
   
  }
    
  return $view_args;
}
add_filter( 'wpv_filter_query', 'tssupp_filter_event_query', 101, 3 );

That is actually affecting your view's output:
- enlace oculto

As you added that view ID 482 for above filter. You added the meta query to filter with event enddate. That is why its not showing the results. Do you want to keep the above filter for view ID 482?

#2606591

Wow... I don't think I ever would have found that. That ID shouldn't have been in that filter—I must have added it by mistake. HUGE thank you for your persistence and help.