Skip Navigation

[Resolved] ERROR: Template Times out

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)

This topic contains 0 reply, has 1 voice.

Last updated by Minesh 5 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2804474

ERROR: Times out
ID: 34565
hidden link
ERROR: Times out
ID: 8700
hidden link
ERROR: Times out
ID: 8700
hidden link

#2804482

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Please share staging site access details as staging site auto-login link shared previously is not working.

I have set the next reply to private which means only you and I have access to it.

#2804725

Minesh
Supporter

Languages: English (English )

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

I've escalated this issue for further investigation in front of our next level support. Please hold on for further updates.

#2806693

Minesh
Supporter

Languages: English (English )

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

The staging site auto-login link you shared is expired. Can you please share staging site access details and make sure it works for next few days without any issue and it does not expire.

#2806708

The link is activated for the next 7 days.

#2806736

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing that - I have passed that to next level support.

Please hold on for further updates.

#2806747

Minesh
Supporter

Languages: English (English )

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

Can you please setup your staging site with 1:1 copy of your live site as our 2nd tier support do not see the issue.

#2806749

Which template is it? As you encountered the issue, since you passed it up.

#2806751

Minesh
Supporter

Languages: English (English )

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

The issues which you shared with this ticket. Maybe during troubleshooting the content is changed.
- hidden link
- hidden link
- hidden link

Just update the original site to stating site and I will pass the information to our next level support so that they can proceed with further trouble shooting.

#2806759

For the first link, you must have removed the gallery, as it's no longer on Staging. But the template still times out on Live.

The second link, also seems to be related to photos; it works on Staging but not live.

The third template, also changed on Staging, all by you. But none of these work on Live.

#2806760

Minesh
Supporter

Languages: English (English )

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

Yes that is why I'm asking you to move current live backup to stating and I will pass it to our 2nd tier support.

#2806763

Please set the next reply to private so I can include the new access details

#2806764

Minesh
Supporter

Languages: English (English )

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

I have set the next reply to private which means only you and I have access to it.

#2807200

Minesh
Supporter

Languages: English (English )

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

To be able to edit the template I made a small edit to the file:
plugins/toolset-blocks/application/controllers/shortcode/resolver/conditionals.php

I commented out line 62, part of the process_conditional_shortcodes function:
=> hidden link

	private function process_conditional_shortcodes( $content ) {
		// return apply_filters( 'wpv_process_conditional_shortcodes', $content );
	}

That allowed me to open the template to edit it.

With every content template you are checking post body (post content) using conditional block,
suspecting that is the cause which I already shared before about the checking post body (post content) using conditional block.

I registered a custom function to "Custom Code" section offered by Toolset with code snippet namely "toolset-custom-code" as a simpler custom function to check of whether post content is empty it will return 0 and if not it will return 1:
=> hidden link

function has_content(){
    global $post;
    $return = empty( $post->content ) ? 0 : 1;

    return $return;
}

Then I've replace the conditional block condition where you are checking post body with the custom function has_content():
- hidden link

I've also registered the function has_content at:
=> Toolset => Settings => Front-end Content => Functions inside conditional evaluations
- https://toolset.com/course-lesson/using-toolset-conditional-block/#checking-for-values-from-custom-functions

Then I saved the template, no problem.

I then edited the above file again to restore the line I had commented out.
I un-commented out line 62, part of the process_conditional_shortcodes function and saved the file.
=> hidden link

	private function process_conditional_shortcodes( $content ) {
		 return apply_filters( 'wpv_process_conditional_shortcodes', $content );
	}

Now I can open the template, edit it, save it.
- hidden link
- hidden link

However - I see many incomplete conditionals with the following content template, you can check and fix it as required.
- hidden link

#2807572

"With every content template you are checking post body (post content) using conditional block" What on earth are you talking about? I never write the condition to check for the body, especially not in every template.

So, if you are saying that part of the problem is some strange conditional statement appearing, this needs to be looked at. Let me repeat, and I think I have said this before. I do not write a conditional statement for every template that checks the body content, why would I?

So, before we move on: Show me where I add the conditional block on every template? I mean, when you say every template, I am looking at 10 right now, and I see no conditional statement I added. Which template checks for the body being empty? I see no reason to check whether it is empty or not. If it's empty, it just displays nothing.

Again, I need to understand your reply here because it doesn't make any sense at all.

I have another template that times out. Template 30720