• Hi,
    I’m trying to create a new post with a custom HTML block, when I add an attribute id on my local is works normally, but when i tried on the server i got 504 Updating failed. The response is not a valid JSON response.

    here is an example of my custom HTML

    <h2 class="wp-block-heading" id="test-heading">Test Heading</h2>

    how to solve this issue?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have no problem saving this code in HTML code. I used WordPress without any plugins and with the standard TwentyTwentyFour theme. Possible causes of problems for you could be the plugins you are using or your theme. Deactivate all plugins as a test and change the theme to find the cause.

    You could also look in the developer console of your browser to see what the exact response is when saving. See: https://www.ads-software.com/documentation/article/using-your-browser-to-diagnose-javascript-errors/

    Thread Starter anugrahjaya1

    (@anugrahjaya1)

    i did some test, deactive plugins and change theme, i still get “Failed to load resource: /wp-json/wp/v2/posts/917?_locale=user:1 the server responded with a status of 504 ()”

    Thread Starter anugrahjaya1

    (@anugrahjaya1)

    i also did on “stg” its working, but why on “prd” still got 504, do you know why?

    504 is a gateway timeout. In this case, the server took too long to respond to the request. There may be more information about this in the error log – but not necessarily. If you cannot find the error log, please contact your hoster’s support team.

    Another thought: does this also happen with a completely empty page in which you insert the HTML block with this code?

    Thread Starter anugrahjaya1

    (@anugrahjaya1)

    no, its happen if i put “id” in custom HTML

    and this is the log
    WARNING: [pool www] child 21218, script '/var/www/html/wp-admin/index.php' (request: "GET /wp-admin/index.php") executing too slow (10.278133 sec)

    threadi

    (@threadi)

    As I said, it doesn’t happen to me. I don’t think the log entry has anything to do with your problem either.

    Have you already tested my tip?

    does this also happen with a completely empty page in which you insert the HTML block with this code?

    Also: deactivate all plugins as a test.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cant use id in Custom HTML Block’ is closed to new replies.