Navigation überspringen

[Gelöst] The view is empty

This support ticket is created vor 5 Jahren, 11 Monaten. 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)

Dieses Thema enthält 19 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Franck vor 5 Jahren, 11 Monaten.

Assistiert von: Minesh.

Author
Artikel
#1213475

Hello,

I'em trying to use API to show view.
On my function file i have this code :
test();
function test() {
$filtered_posts = get_view_query_results( 5333 );
//print_r($filtered_posts);
foreach ( $filtered_posts as $filtered_post ) {
//$lien = types_render_field( "pt-theme", array('id'=>$filtered_post->ID, 'output'=>'raw'));
}
print_r($filtered_posts);
}

And on my site i have an empty array.
Strange. Because when i use the same view on the front it is working :versteckter Link

Thanks for your answer.

#1213564

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - when you say that the view is working on the following page:
=> versteckter Link

Do you mean that you want to see the message "Bon Voyance Gratuit" message or I misunderstood something here?

#1213604

Hi,
No i just want $filtered_posts is not empty because i couldn't be empty.

Do you think there is a problem in my code to use API ?

#1213606

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Well - I can tell you once I can review your current 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.

#1213610

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

I was looking at the view you shared:
=> versteckter Link

The view is attached to post type as well as Repeating field group as well that is not correct.

I checked the page where the view is added - the view do not display any records there.
=> versteckter Link

Can you please let me know what entry you are looking to display there. Do you also want to display associated Repeating Field Group as well?

#1213616
Capture d’écran 2019-03-13 à 10.01.15.png

The view display something as you can see in my picture.

#1213665

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Well - just checking with you. are you working on the site? I see now page is not displayed. It asks me every time to assign the Layout.

#1213669

No, i don't work on website

#1213685

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

I've created "toolset-test" page and when I preview it - it displays "no items found" - is this correct?
=> versteckter Link

I just do not able to assign the Layout to this page.
Or
Can I have same test page where you assigned the layout?

#1213715

It is really strange.
You have changed the view and you say it is not working.

I have re-updated the view and it is working.

versteckter Link

I added argument because with the cache cloudflare

#1213719

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Is it possible for you to disable the cache untile I work on this issue, as it seems cache issue that is why changes I make do not apply or I see strange results.

#1213730

I am sorry, but we have a really big trafic and i can not 🙁
But can just add something after url... it is the same thing, no ?

#1214070

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Well - there is something really strange going on - for now it looks like from cache:

I removed the view and just trying to display the plain text "nice" added to the text editor:
=> versteckter Link

On frontend - I still see the word "Bon Voyance Spéciale Gratuite":
=> versteckter Link

Please check the following screenshot:
=> versteckter Link

#1214110
Capture d’écran 2019-03-14 à 10.42.32.png

Me i just see "Nice" as you can see.

#1214142

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

This is really strange - now even I can see only "nice" word. Please see the screenshot:
=> versteckter Link

So that means whatever changes we make takes some time to have the effect.

The screenshot you shared here with shows the unwanted text:
https://toolset.com/forums/topic/the-view-is-empty/#post-1213616

Even I was seeing the same text when I send you the screenshot with my previous reply:
=> versteckter Link

But now, the unwanted text disappears as you can see now:
=> versteckter Link