Tell us what you are trying to do?
I am trying to edit a content template that I created but when I try to edit, the page returns a 504. Other templates and the rest of the site continues to work. The template actually still works on the page it is applied to. So it's only the attempt to edit that times out.
I turned on debugging but nothing relevant seems to show up there.
I was able to get the shortcode version from the template post via phpmyadmin, but I can't tell if there is an error in there or what is going on. I was thinking that as a first step, if someone could take a look at that to see if it is causing some infinite loop or some other situation.
Is there any documentation that you are following?
Not specifically, although I've created lots of similar templates with the block editor in the past.
Is there a similar example that we can see?
I've seen other support tickets with a similar issue, but none of the solutions seemed relevant. I have tried deactivating all plugins with no luck. It seems specific to this one template.
What is the link to your site?
This link goes to a page (that works) that uses the template I am unable to edit: hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
To troubleshoot this further, I'll need to see how this template and other elements are set up in the admin area. Can you please share temporary admin login details, in reply to this message?
I'll also need your permission to download a clone/snapshot of the website, as it will most likely need to be tested on a different server too.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
regards,
Waqar
Thank you for sharing these details and I've downloaded your website's clone.
I'm currently performing some tests on this template's content and will share the findings, as soon as this testing completes.
Note: This investigation is going to be complex and time-consuming since the template's content is very long and there are a lot of active third-party plugins involved.
Just wanted to let you know that I'm still working on this and will share further findings, by the end of the day today.
Hi Waqar, thank you for taking the time to help with my issue!
I was on a couple of days off but will resume investigation on this issue today.
Thank you for waiting, as I completed this investigation.
It turns out that the affected content template includes two conditional checks, that check whether the current post content/body is empty or not and shows the shortcode for the content/body accordingly:
Example:
[wpv-conditional if=" NOT ( empty( '[wpv-post-body view_template="None" ]') ) " ]<!-- wp:tadv/classic-paragraph -->
[wpv-post-body view_template="None"]
<!-- /wp:tadv/classic-paragraph -->[/wpv-conditional]
This usage puts the content of the template in an infinite loop and it times out, eventually.
Removing both these conditional checks around the '[wpv-post-body view_template="None"]' shortcode fixes the template.
Here is content with the same changes, which you can update in the affected template's 'post_content' column in the posts table, through the phpMyAdmin:
hidden link