WordPress.org

Make WordPress Core

Opened 7 weeks ago

Closed 3 weeks ago

#51497 closed defect (bug) (worksforme)

Custom HTML Block with Javascript not saving

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

Description

"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
7 weeks 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:
https://github.com/WordPress/gutenberg/issues/26002
https://github.com/WordPress/gutenberg/issues/25278

#2 @10bradders10
7 weeks 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 = "https://www.semrush.com/leadgen/static/js/widget.min.js";
        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"
            });
        }
    })();

</script>
<!-- /semrush siteaudit widget -->

or this code

<script src="https://bookme.name/js/booklikeaboss.embed.js?i=3048&h=k4ND4TCutlQuiswPPstg5wI4oBCoNMosqHka7NT19bHRzB2VnmIo4I0J9SRn" 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?

Thanks.

#3 @10bradders10
7 weeks ago

Hi @sabernhardt,

Can you confirm if this is a bug please?

What's the process with this ticket?

Thanks.

#4 @sabernhardt
7 weeks 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 weeks ago

  • Keywords close added; reporter-feedback removed

#6 @noisysocks
3 weeks ago

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