Skip Navigation

[Resolved] Continuing 504 when loading a template

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 3 replies, has 2 voices.

Last updated by Minesh 1 year, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2686103

Tell us what you are trying to do?
A follow-up to this thread:
https://toolset.com/forums/topic/504-when-trying-to-edit-content-template-other-content-templates-work-fine/

I replaced the faulty code with the endless redirect, and it works, but whenever I save, it crashes again. Upon inspection, the faulty code from the previous ticket has reappeared, even though it does not seem to be something I have added.

I go back, remove those instances, then the template editor loads. I save the template and close. The next time I open it, I get the 504 again.

Other than removing those infinite loops, is there something else in my template that would automatically create these codes that need to be removed?

Is there any documentation that you are following?
The previous support ticket

What is the link to your site?
hidden link

#2686242

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Are you talking about the following content template? If yes:
- I can access the content template without any issues.
hidden link

I see you have too many nested conditional setup added. Is there any other conditional statement where you are checking against post body?

#2686342

Hi Minesh,

That is the current template and I can access it as well. Before I open the template, I make a backup/duplicate. Then, I will open the template and make minimal changes, save and see the changes applied to the front end. Then, it seems if I don't close it immediately after that, the next time I refresh the template, I get a time out and if I look in phpmyadmin to get the codes/shortcodes, the snippets that were removed have reappeared and do not seem to have anything to do with the changes I made.

I remove the snippets that are causing the issue then move the updated code to the backup and can edit again.

Sorry, this is difficult to explain.

So do you think that I have too many conditionals for this to work well? Is there a way to keep the current functionality without overloading the system?

Thank you,

Jason

#2686383

Minesh
Supporter

Languages: English (English )

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

504 status code error related to server and it could be possible that your server is blocking request or CDS or what else could be.
- hidden link
- hidden link

I still see you have added the conditional statement on post body - I suggest you should not use the conditional block and instead try to use the [wpv-conditional] shortcode, for that you should try to add the "Fields and Text" or "Shortcodes" block and add the conditional shortcode to it.
- https://toolset.com/documentation/legacy-features/views-plugin/conditional-html-output-in-views/
- https://toolset.com/documentation/legacy-features/views-plugin/checking-fields-and-other-elements-for-emptynon-empty-values/

I strongly suggest you should remove all conditional block using which you try to check the post body and instead use the shortcode method and I hope that will help you to resolve the issue.

More info:
- https://toolset.com/documentation/programmer-reference/views/using-custom-functions-in-conditions/#checking-for-empty-post-content

#2686973

Thank you for the advice, I'll give it a shot