Skip Navigation

[Resolved] Infinite loop

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 3 voices.

Last updated by Waqar 1 year, 8 months ago.

Assisted by: Waqar.

Author
Posts
#2438393
Screen Shot 2022-08-15 at 6.50.26 PM.png

Gak, what am I doing wrong? Infinite loop?

Is there a similar example that we can see? hidden link

What is the link to your site? hidden link

#2438611

Nigel
Supporter

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

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

Hi there

Something like that could arise if you use a Content Template in the output of a View and the template also outputs the same View, though there may be other ways this could happen.

What is the structure of templates and Views used on the page, or anything that outputs the post body?

#2439093
Screen Shot 2022-08-16 at 3.18.00 PM.png

Using a content template and a view.

Content Template is "Search Guides":

<div class="eat-review-title-overview">
<div class="eat-page-title entry-title">
</div>
<div class="eat-body-guide">[types field="body"][/types]
</div>
<div class="lower-breadcrumb">[yoast-breadcrumbs]
</div>
</div>

I removed an extra [wpv-post-body view_template="template-for-vacation-houses"] from the View, now it is "Search Vacation Houses by Region":

[wpv-post-body view_template="search-vacation-houses-by-regions-template"][wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->

<div class="nb-container">

<wpv-loop>
[wpv-post-body view_template="loop-item-in-search-vacation-houses"]
</wpv-loop>
</div>
<!-- wpv-loop-end -->

[/wpv-items-found]
[wpv-layout-end]

Now I have this: (see image), and it doesn't find anything.

Gak.

#2439343

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for sharing this update.

Can you please share temporary admin login details, so that I can see how this view and the content template are set up?

I'll be in a better position to suggest the next steps, accordingly.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2440071

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the admin access.

I noticed that your search guide "Sales" was now showing the search results correctly.
{yourwebsite.com}/search-guide/sales/

However, the one from your screenshot "Rent a Vacation House" wasn't showing any results.

That is because it is calling the view named "Search Vacation Houses by Regions", but the view can't find the content template with the slug 'loop-item-in-search-vacation-houses', that is being called in its loop:


[wpv-post-body view_template="loop-item-in-search-vacation-houses"]

I've updated that content template shortcode to use the content template with the slug "loop-item-in-search-sales-by-region" and the results are showing now:
( {yourwebsite.com}/search-guide/rent-a-vacation-house/ )


[wpv-post-body view_template="loop-item-in-search-sales-by-region"]

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.