Skip Navigation

[Resolved] Content template goes blank when content added

This support ticket is created 5 years, 11 months ago. 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 5 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#900386

I am trying to: Complete a document that uses many conditionals

Link to a page where the issue can be seen: hidden link

I expected to see: A long page full of content

Instead, I got: A blank page

I have successfully been using Toolset for a while, and this page has a load of content on it (approx 1500 lines). However, I am experiencing what I believe to be a timeout. This is a very 'conditional-heavy' page, because it's a structured document. I have removed pre-processing of the page as per my previous support ticket, but now this page seems to hit a 'content limit' and then render a blank page. Please see this video of the error: hidden link - you can see here (hidden link) where I've managed to add, just a single character and it clears the entire page. (Since taking the video, I've deactivated all other plugins so am able to add a couple more characters, but not many)

I have increased my memory limits to 512M which should be adequate, I've also implemented the debugging suggestions mentioned here: https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/?utm_source=viewsplugin&utm_campaign=views&utm_medium=toolset-settings&utm_term=documentation%20page?utm_source=viewsplugin&utm_campaign=views&utm_medium=toolset-settings&utm_term=documentation%20page and I'm getting no output whatsoever in either the error-log.txt file (the one error in there was because I tried to increase my memory limit to 1GB), console or even my server php error log - so I am totally stumped.

#900399

Hello,

Thanks for the details, I can see the problem in your website, and in the content template "Privacy Policy V2":
You are using a lots of nested [wpv-conditional] shortcodes, for example:

        [wpv-conditional if="( $(wpcf-securing-information-do-you-have-an-ssl-certificate-installed-on-your-website) eq 'yes' )"]
            encrypting transfers of data to or from our servers using Secure Sockets Layer (SSL) technology, 
            [wpv-conditional if="( $(wpcf-does-your-website-have-any-kind-of-ecommerce-online-sales-functionality) eq 'yes' )"]
                encrypting payments you make on or via our website using Secure Sockets Layer (SSL) technology,
            [/wpv-conditional]
        [/wpv-conditional]

It is not recommended to use such kinds of codes insider a large content template, that will conduct some unexpected result.

I suggest you split the content template into multiple content templates, for example: one row one content template

<div class="row1">[wpv-post-body view_template="row-1"]</div>
<div class="row2">[wpv-post-body view_template="row-2"]</div>
<div class="row3">[wpv-post-body view_template="row-3"]</div>

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body

and do not use nested [wpv-conditional] shortcodes in a single content template, for example, one [wpv-conditional] shortcode, one content template:

        [wpv-conditional if="( $(wpcf-securing-information-do-you-have-an-ssl-certificate-installed-on-your-website) eq 'yes' )"]
            [wpv-post-body view_template="anther-content-template"] here display another content template "anther-content-template"
        [/wpv-conditional]

In the content template "anther-content-template", display the insider codes:

            encrypting transfers of data to or from our servers using Secure Sockets Layer (SSL) technology, 
            [wpv-conditional if="( $(wpcf-does-your-website-have-any-kind-of-ecommerce-online-sales-functionality) eq 'yes' )"]
                encrypting payments you make on or via our website using Secure Sockets Layer (SSL) technology,
            [/wpv-conditional]

And test again.

#900844

Hi,

Thanks for coming back to me. OK, this makes sense, though it's a little frustrating that I now need to re-work over 1000 lines of code. However, if this is a solution that works, I'm happy.

Is there any limit to the number of nested content templates - so for instance if I had a conditional with a content template inside, with a conditional with another nested content template inside it, that would be considered 2 levels. Is this possible?

#900856

Yes, it is possible, to use more nested level with more content template, please let me know if you need more assistance.

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