Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom HTML block: "An unknown error occurred." (2.3.0) #5381

Closed
zakoops opened this issue Mar 3, 2018 · 4 comments
Closed

Custom HTML block: "An unknown error occurred." (2.3.0) #5381

zakoops opened this issue Mar 3, 2018 · 4 comments

Comments

@zakoops
Copy link

zakoops commented Mar 3, 2018

Issue Overview

Is it my WP installation that plays havoc with the Custom HTML block under version 2.3.0 of Gutenberg?

In essence, it's impossible to use Custom HTML blocks in the Visual Editor — these blocks showing message "An unknown error occurred."

Under same setup, Custom HTML blocks were OK up to version 2.2.0

Guess this is related to new syntax highlighting (Code mirror) in Custom HTML blocks...

Steps to Reproduce (for bugs)

  1. Create a new post
  2. Verify that the Visual Editor is active
  3. Insert a block of type Custom HTML

Tested with WP version 4.9.4 and Safari (11.0.3) and Chrome (64.0.3282.186)

Everything else in Gutenberg works ok.

Expected Behavior

Should be able to edit the block contents, obviously...

Current Behavior

Message "An unknown error occurred." stops any interaction.

Possible Solution

Judging by error log shown by the Chrome inspector, some dependencies are not loaded correctly.

Same problem is noted on hosted site and on localhost.

Screenshots / Video

I tried to maximize information in this screenshot:

custom-html-error

Related Issues and/or PRs

Don't know how this problem could be related to issue #5374.

@zakoops
Copy link
Author

zakoops commented Mar 6, 2018

As additional information...

Firefox (58.0.2) offers maybe a more succinct and useful view of the problem I raised a few days ago:

custom-html-error-2

The following message which appears in yellow in the screenshot essentially says in English: "Failed to load the <script> element whose source is...":

Échec du chargement pour l’élément <script> dont la source est "http://.../wp-admin/load-scripts.php?load=wp-codemirror,code-editor,htmlhint,csslint,jshint".

@youknowriad
Copy link
Contributor

youknowriad commented Mar 6, 2018

For some reason, your installation is not loading the wp-codemirror script. Maybe you have a plugin that disabled this script or something?

@zakoops
Copy link
Author

zakoops commented Mar 6, 2018

@youknowriad

Not sure the problem is settled...

  • I deactivated and even deleted all plugins in the installation
  • and activated the Twenty Seventeen theme

With this new plain vanilla setup, the Gutenberg plugin has been installed anew and activated.

Still, the Custom HTML block shows the same error (‘An unknown error occurred’).

And I'm not alone here: please see this page on the WordPress support forum...

@youknowriad
Copy link
Contributor

Ok let's consolidate in #5374 as it's the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants