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 "An unknown error occurred" mixed content error #8164

Closed
Forecaster opened this issue Jul 24, 2018 · 7 comments
Closed

Custom HTML "An unknown error occurred" mixed content error #8164

Forecaster opened this issue Jul 24, 2018 · 7 comments
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Comments

@Forecaster
Copy link

Describe the bug
When trying to use the custom HTML block the following is shown:

image

It appears to be unable to load the code editor because it's trying to load it via http on my https site. So the script is blocked.

image

To Reproduce
Steps to reproduce the behavior:

  1. Have SSL enabled site
  2. Try to use Custom HTML block
  3. Observe Mixed Content error hopefully?

Additional context
Using Gutenberg 3.3.0
Just updated in fact and unfortunately the issue remains.

Running WordPress 4.9.7 on an ancient Ubuntu Server 12.04.5 box, with a very old PHP version (unfortunately)

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks labels Jul 24, 2018
@designsimply
Copy link
Member

designsimply commented Jul 24, 2018

Tested and confirmed and noting that I saw a different warning in the console:

Loading failed for the <script> with source “https://cute.wordpress.com/wp-admin/undefined/wp-admin/load-scripts.php?load=wp-codemirror,code-editor,htmlhint,csslint,jshint,htmlhint-kses”.

screen shot 2018-07-24 at tue jul 24 11 05 16 am
Tested with WordPress.com and Gutenberg 3.2.0 using Firefox 61.0.1 on macOS 10.13.6. Note: I used 3.2 for a quick test but it would be nice to have an additional confirmation with a later version. 😊

@tofumatt tofumatt self-assigned this Jul 24, 2018
@tofumatt tofumatt added this to the 3.4 milestone Jul 24, 2018
@tofumatt
Copy link
Member

It seems like there is an unrelated bug in latest master with http sites; I get TypeError: potentialIframe is undefined trying to replicate this on an HTTP site. 😢

@pento pento modified the milestones: 3.4, 3.5 Jul 30, 2018
@tofumatt tofumatt modified the milestones: 3.5, 3.6 Aug 8, 2018
@tofumatt
Copy link
Member

tofumatt commented Aug 8, 2018

#8211 will help in debugging this but I don't think I'll get to this today so moving the milestone. Sorry 😞

@Forecaster
Copy link
Author

It's fine. There's a workaround in Chrome. It has the option to allow insecure scripts to load which allows the HTML editor to work until the next session.

image

@youknowriad youknowriad modified the milestones: 3.6, 3.7 Aug 15, 2018
@arekkopczynski
Copy link

I have had the same error, during developing webiste on address http://site.com HTML block work's fine. After change domain and activate https - HTML block display error. For me helped set addres in wp-config:

define('WP_HOME','https://site.com');
define('WP_SITEURL','https://site.com');

@Forecaster
Copy link
Author

This solution worked for me as well. I didn't know about these statics before.

@youknowriad youknowriad modified the milestones: 3.7, 3.8 Aug 30, 2018
@tofumatt tofumatt removed their assignment Jan 31, 2019
@designsimply
Copy link
Member

I re-tested today on an SSL-enabled site, with the proper HTTPS values used for WP_HOME and WP_SITEURL, and the Custom HTML block did not display any errors when I tested it.

Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

6 participants