Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51497 closed defect (bug) (worksforme)

Custom HTML Block with Javascript not saving

Reported by: 10bradders10's profile 10bradders10 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5.1
Component: Editor Keywords: close
Focuses: Cc:


"Updating failed" error.

For Custom HTML Block with a javascript code from external site.

Is this an existing bug?

Tried all plugins off and default theme on, and same issue.

Does the javascript have to be edited specifically?

Change History (6)

#1 @sabernhardt
4 years ago

  • Component changed from General to Editor
  • Keywords reporter-feedback added
  • Severity changed from blocker to normal

@10bradders10 Thanks for the report!

Could you outline the steps to reproduce the error? And, after removing any sensitive or proprietary information, could you post the script here to see if the problem is related to that specific code?

In addition to a simpler script, I tried the sample script from ticket #49480. WordPress encoded the ampersand character, but that did not result in any "Updating failed" or "Publishing failed" errors for me.

These two issues also might be related:

#2 @10bradders10
4 years ago

To reproduce:

  1. Add Custom HTML Block
  2. Paste in code.
<!-- semrush siteaudit widget -->
<div id="ssa-widget"></div>
<script type="text/javascript">
    (function() {
        var p = "";
        var d = document, s = d.createElement("script");
        s.src = p + "?v=" + Math.random();
        (d.head || d.body).appendChild(s);
        s.onload = function() {
            new SEMRUSH.SiteauditWidget({
                widgetApiKey: "594049775f50e972b3ae4a2a"

<!-- /semrush siteaudit widget -->

or this code

<script src="" async></script>
  1. Update page.

Currently trying to confirm if this is a bug in WP, or a server issue.

Anyone else experienced the same?


#3 @10bradders10
4 years ago

Hi @sabernhardt,

Can you confirm if this is a bug please?

What's the process with this ticket?


#4 @sabernhardt
4 years ago

Sorry, I wasn't able to reproduce the error with either code on my staging site (on SiteGround). This suggests it might be related to server configurations. In that case, opening a topic on the support forums likely would help you more (and help anyone else with a similar problem).

Please report back here if this is confirmed as a core bug. (If it's specifically a bug with the editor, reporting on a GitHub issue would be more appropriate, but I'd still want an update here.)

#5 @sabernhardt
4 years ago

  • Keywords close added; reporter-feedback removed

#6 @noisysocks
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.