Skip Navigation

[Resolved] View broken after latest plugin updates

This thread is resolved. Here is a description of the problem and solution.

Problem:

After updating to the latest Types and Views, one of my views is not functioning properly. The first item from the view is showing the title and text of the page instead of the item itself, and it displays a message about an infinite loop. The issue only happens with this view and some variations using the same content type.

Solution:

Update Toolset and Toolset addons to the latest version.

Relevant Documentation:

https://toolset.com/faq/how-to-install-and-register-toolset/

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.

This topic contains 8 replies, has 2 voices.

Last updated by matthewC-9 1 year, 7 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2586901

Hi! After updating to the latest Types and Views, one of my views is no longer working correctly. The first item from the view displays the title and text of the page where it displays instead of the item in question. It also shows a message saying "Content not displayed because it produces an infinite loop. The wpv-post-body shortcode was called more than once with the same attributes". It's only the first item where this happens - the rest of the list looks fine after that. And other views are fine - it's just this one and some variations using the same content type where the issue is happening.

Here's an example of it happening on our test site: hidden link

And here's our live site, which I've rolled back to Types 3.4.18 and Views 3.6.5: hidden link

The view is pulled in by a shortcode in the page body, in this case: [wpv-view name="person-by-department-list" wpvdepartment="teen-services"].

Here's what's in the loop editor:

[wpv-layout-start]
	[wpv-items-found]
<div class="department-people-list">
	<!-- wpv-loop-start -->
	<wpv-loop>
		[wpv-post-body view_template="loop-item-in-person-by-department"]
	</wpv-loop>
	<!-- wpv-loop-end -->
</div>
	[/wpv-items-found]
	[wpv-no-items-found]
	[/wpv-no-items-found]
[wpv-layout-end]

And here's the view template:

<div class="person person-list card">
  
[wpv-conditional if="( $(wpcf-bio-picture) ne '' ) OR ( $(wpcf-bio-list-picture) ne '' )"]
  <div class="person-list-image alignleft">
      <!-- [types field='bio-picture' title='%%TITLE%%' alt='%%ALT%%' size='full'][/types] -->
    [types field='bio-list-picture' title='%%TITLE%%' alt='%%ALT%%' size='large' resize='proportional'][/types]
    [wpv-conditional if="( $(wpcf-bio-list-picture) eq '' )"]
[types field='bio-picture' title='%%TITLE%%' alt='%%ALT%%' size='large' resize='proportional'][/types]
    [/wpv-conditional]
</div>
  [/wpv-conditional]
      

    [wpv-conditional if="( '[wpv-post-real-excerpt]' ne '' )"]
      <h3>[wpv-post-link]</h3>
    [/wpv-conditional]
    [wpv-conditional if="( '[wpv-post-real-excerpt]' eq '' )"]
      <h3>[wpv-post-title]</h3>
    [/wpv-conditional]
  
    [wpv-conditional if="('[wpv-attribute name="wpvdepartment"]' eq 'board-of-trustees') OR ('[wpv-attribute name="wpvdepartment"]' eq 'bot-liaison')"]
  <h4 class="bot-role">[types field='bot-role'][/types]</h4>
    [/wpv-conditional]

  [wpv-conditional if="( [wpv-post-id] ne [wpv-post-id item='@location.parent'] )"]
    <p>
      [wpml-string context="wpv-views"]Location:[/wpml-string] [wpv-post-link item="@location.parent"]
    </p>
  [/wpv-conditional]

  [wpv-conditional if="( $(wpcf-job-title) ne '' ) AND ( $(wpcf-bio-contact-format) ne '' ) AND ('[wpv-attribute name="wpvdepartment"]' ne 'bot-liaison')"]
    <p>
      [types field='job-title'][/types]
    </p>
  [/wpv-conditional]

  [wpv-conditional if="( $(wpcf-email-address) ne '' ) AND ( $(wpcf-bio-contact-format) ne '' )"]
    <p>
      [wpml-string context="wpv-views"]Email:[/wpml-string] [types field='email-address'][/types]
    </p>
  [/wpv-conditional]

  [wpv-conditional if="( $(wpcf-phone-number) ne '' ) AND ( $(wpcf-bio-contact-format) ne '' )"]
    <p>
      [types field='phone-number'][/types]
    </p>
  [/wpv-conditional]

  [wpv-conditional if="( '[wpv-post-real-excerpt]' ne '' )"]
    [wpv-post-excerpt]
  [/wpv-conditional]
  [wpv-conditional if="( '[wpv-post-real-excerpt]' eq '' )"]
    [wpv-post-body view_template="None"]
  [/wpv-conditional]  

  [wpv-conditional if="( $(wpcf-personal-pronouns) ne '' )"]
    <p class="personal-pronouns">
      [wpml-string context="wpv-views"]Pronouns:[/wpml-string] [types field='personal-pronouns'][/types]
    </p>
  [/wpv-conditional]
  
</div>

Is there something I can change in the view to prevent this?

Thanks!
Sarah

#2587333

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Would you please temporarily remove the content template from the loop?

[wpv-post-body view_template="loop-item-in-person-by-department"]

And instead paste the whole code of the content template inside the loop and remove the content template content?

See if it fixes the issue for you?

Thanks.

#2587533

Hi there - thanks for the response! I tried doing it that way and still get the same thing.

#2587555

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you. Would you please provide the staging version login information by marking the next reply as private, and point me where to check to see the issue?

Finally, I'd appreciate it if you can give me the result of the isolated test for the issue:

- IMPORTANT STEP! Create a backup of your website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except WPML and its add-ons.
- Check if you can still recreate the issue.

I understand you mentioned it is related to the latest version, but I need to know if that has anything to do with a plugin conflict on the new version or an independent factor.

Thanks.

#2588135

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Thank you for the information. I reported this to the second-tier.

I will get back to you as soon as I have an update.

Thank you.

#2591913

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

The issue is replicated by our second-tier support and reported to the development team.

I will inform you when there is a fix.

For now we published an erratum about the issue:

https://toolset.com/errata/wrong-output-for-the-first-item-in-the-loop-of-a-view/

Thank you.

#2592107

Thanks for the update - I appreciate it!

-Sarah

#2597349

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I wanted to let you know that we published plugin updates today that includes a fix for this issue (in your case Views 3.6.7).

If the update does not show up on your plugin installer page (click the registered link beneath the plugin name to go to the custom installer page) click the Check for Updates button to update the list.

Or you can download the latest versions from your accounts page: https://toolset.com/account/downloads

Thanks.

#2597853

Hi Christopher,

That's great news! I just installed the update, and everything is looking good. Thanks for your help--

-Sarah