Skip Navigation

[Resolved] Legacy view issue

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 11 replies, has 2 voices.

Last updated by Nigel 1 year ago.

Assisted by: Nigel.

Author
Posts
#2661379

Hi,

following your guide (see here: https://toolset.com/forums/topic/legacy-slider-view-only-one-row-on-mobile/#post-2655801) I have managed to create 3 legacy views that show a repeatable custom field group exactly like I want.

The problem is that there is a fourth view I am not able to make it work, and I don't know why. I have done exactly the same steps, and tried to duplicate one of the views that are working, I have started from scratch, but nothing seems to be working.

This is the page: hidden link
In this point you can see the view that is not working, while here on the same page, there is another one that is working fine: hidden link

I have spent hours without any progress, I hope you can shed some light...

#2661629

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

On the page where it is not working, the View displays "No items found", meaning that whatever this View is set to display doesn't exist (i.e. there are no posts of the content type specified, or no such posts after any filtering of results).

If you think there should be, would it be possible to get access to your site to be able to inspect the setup of the View in question?

Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

#2662083

Yesterday I sent the details. Were you able to get in?

#2662129

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks for that.

The View in question is "aplicaciones-food-test" which is inserted via wpv-view shortcode into the Content Template for Equipos de análisis alimentarios, with a relatedto attribute passing the current post ID.

The View is set to display both "Equipos de análisis alimentarios" posts and "Aplicaciones Food" Repeatable Field Groups, with a Query Filter to show only posts that are related to the post where this View is shown.

That means no "Equipos de análisis alimentarios" posts could be returned by this View, and I assume your intention is to show repeatable field groups belonging to the currently shown post.

In the example of the link you shared, there are groups of repeatable fields added to the Scrubber post for Aplicaciones Food, though each group does not contain any field values, they are empty.

I updated the Content Selection to only query the repeatable field group and turned on the debugging setting for Views to be able to see the generated queries. I note the query arguments passed to the call on WP_Query look correct, though the generated SQL query is transformed by WPML, and it looks like that is where the problem arises.

I have added a plugin to your site to be able to inspect the database tables directly, and I have identified something that is causing the problem, but I still need to look at why.

I am continuing to work on this and will update you again.

#2662171

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

It appears something went wrong adding the language information for the repeatable field groups (even though you are only working with them in the default language at the moment, they still need to have their language information set to Spanish) which prevents the View query from returning any results.

I need to take a closer look to investigate why that is happening.

Is it okay if I download a copy of your site to work on locally?

#2662255
Screenshot 2023-11-08 at 19.12.30.png

Yes it's totally ok!

And thank you very much for you efforts!

I have just added some content to the example post (scrubber).

I have other views that are working, even though they have the same setting: post + repeatable group selected...

Thank you again

#2662631

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Are there some server security restrictions on your site?

I am trying to install a backup plugin but it's not possible (bad gateway error is showing). It doesn't seem to be possible to install any plugins (e.g. Classic Editor).

#2662641
Screenshot 2023-11-09 at 13.57.35.png

Mm, that is weird. When did you have this problem?
I have just installed and activated the Classic editor without problems.

If it was this morning, I was making a backup. As for the backup, I am using WPTime Capsule already. You should see it and you could launch a new backup in case of need.

#2662717

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

It must have been a temporary issue, it's working now, and I've used it to extract a copy of the site, and I have succeeded in installing that locally.

I'll work on that and get back to you.

#2663141

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, I wrote a reply to you earlier today but it seems to have got lost, let me try again.

In brief, I identified a problem with how language information for some of the app-food repeatable field groups is stored.

I don't know how it came about (I don't have the full history of the site), but if I add new content it appears to be stored correctly.

So I propose the run a SQL query on your site to fix the problem data, but before I do that I want to make sure you have a current backup.

When you confirm that I can try the fix, and then you can check to see if things appear to be working normally.

#2663149

Thank you Nigel, I really appreciate your help.

I have just downloaded a copy of the database and have done a full backup with Time Capsule, so you can go ahead. Let's hope for the best 😉

Cheers

#2663197

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, I've done that, and it looks like it is working.

Please check this and other pages of your site to see that everything appears as expected.

Let me know if it works out okay.

#2663945

It is working now, thank you very much Nigel!