Skip Navigation

[Resolved] More than 9 images inside my conditional output shows shortcode

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 9 replies, has 2 voices.

Last updated by Ryan 6 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#617951

I am trying to:

Display my single "property image" and the additional "property gallery images" as thumbnails under the large "property image"

Link to a page where the issue can be seen:

hidden link

I expected to see:

The series of thumbnails.

Instead, I got:

The shortcodes from the layout that should display the <img> tags

Additional Info:

This only happens when I have a total of 10+ images. So 1 property photo and 9 property gallery images or no property photo and 10 property gallery images. When less than 10 total, the thumbnails display perfectly as shown here - hidden link

Here is the Layout code I'm using:

[wpv-conditional if="( $(wpcf-property-gallery) ne '' ) OR ( $(wpcf-property-photo) ne '' )"]
<div class="text-center property-gallery">
	<ul>
	[wpv-conditional if="( $(wpcf-property-photo) ne '' )"]
      <li><a href="[types field='property-photo' raw='true' link='false'][/types]" rel="lightbox" class="thickbox">
        
        [types field='property-photo' alt='%%ALT%%' title='%%TITLE%%' width='150' height='100' align='none' resize='crop'][/types]
        
       <!-- [types field='property-photo' link='false' width='151' height='100' align='none' resize='crop' alt='%%ALT%%' title='%%TITLE%%'][/types]-->
        </a></li>
 	[/wpv-conditional]
 	[wpv-conditional if="( $(wpcf-property-gallery) ne '' )"] 
  		[wpv-for-each field="wpcf-property-gallery"]
          <li><a href="[types field='property-gallery' raw='true' link='false'][/types]" rel="lightbox" class="thickbox">
          [types field='property-gallery' link='false' width='152' height='100' align='none' resize='crop' alt='%%ALT%%' title='%%TITLE%%'][/types]
            </a></li>
		[/wpv-for-each]
  	[/wpv-conditional]
	</ul>
</div>
[/wpv-conditional]
#617965

Forgot to wrap my layout code. Here it is again -

[wpv-conditional if="( $(wpcf-property-gallery) ne '' ) OR ( $(wpcf-property-photo) ne '' )"]
<div class="text-center property-gallery">
	<ul>
	[wpv-conditional if="( $(wpcf-property-photo) ne '' )"]
      <li><a href="[types field='property-photo' raw='true' link='false'][/types]" rel="lightbox" class="thickbox">
        
        [types field='property-photo' alt='%%ALT%%' title='%%TITLE%%' width='150' height='100' align='none' resize='crop'][/types]
        
       <!-- [types field='property-photo' link='false' width='151' height='100' align='none' resize='crop' alt='%%ALT%%' title='%%TITLE%%'][/types]-->
        </a></li>
 	[/wpv-conditional]
 	[wpv-conditional if="( $(wpcf-property-gallery) ne '' )"] 
  		[wpv-for-each field="wpcf-property-gallery"]
          <li><a href="[types field='property-gallery' raw='true' link='false'][/types]" rel="lightbox" class="thickbox">
          [types field='property-gallery' link='false' width='152' height='100' align='none' resize='crop' alt='%%ALT%%' title='%%TITLE%%'][/types]
            </a></li>
		[/wpv-for-each]
  	[/wpv-conditional]
	</ul>
</div>
[/wpv-conditional]
#618649

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

Thank you for contacting our support forum.

Would you mind sending me a link to a page that this issue is occurring?

Thanks,
Shane

#618754

Hey Shane - Here is the link - hidden link
I included some other important details in the original post above.

#618797

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

Not sure if you've tried this as yet but would you mind temporarily disable all the non-toolset plugins and check again to see if the issue still remains?

If it does would I be able to get admin access to your website so that I can investigate the issue further ?

The private fields will be enabled for your next response.

Thanks,
Shane

#618863
#619018

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

Thanks for confirming, also sorry i didn't notice the credentials in the first post.

I would also like to verify that this isn't an issue with the server so I would like to create a duplicate of your website locally so that I can test without affecting your live site.

Please let me know if I can proceed with this.

Thanks,
Shane

#619160

Sure! I included a link to the duplicator package in the original post as well. Thanks!

#619671

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

Awesome, i'll be running some checks to see what I can find. I'll report to you as soon as possible.

Thanks,
Shane

#619694

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

The issue is the nesting of the conditionals.

It seems that there is too much data for the [wpv-conditional if="( $(wpcf-property-gallery) ne '' ) OR ( $(wpcf-property-photo) ne '' )"] conditional to process.

What I would suggest is to restructure this. Is there a case where you allow users to upload a property without a photo ?

Making at least one of these fields required should resolve this issue.

Thanks,
Shane

#620742

I removed the outer condition so they are no longer nested and the issue is resolved.

Thanks for all the help Shane!

The forum ‘Types Community Support’ is closed to new topics and replies.