-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 blocks don't load when WordPress is served out of a subdirectory #5374
Comments
Are you missing the code mirror script like #5381 Do you have any particular plugin or code disabling this script? |
What if you go to |
What if you go to I fall directly in the classic WordPress Code Editor, with gutenberg.php in the edit window. Is that what you want to know? |
no, or try to go to "Appearance -> Editor" for instance, do you see the theme editor? |
Yeah sure, I can go there, and with syntax highligting working OK. |
Thanks for confirming, might have something to do with the way we load code mirror in Gutenberg or something but it's hard to fix if we can't reproduce :) |
Thanks for verifying! |
I downloaded my site from the AIX server lock stock and barrel, imported the database and started running it locally. Everything is just the same except when I try to load the custom HTML block. |
OK, I have an explanation.
which was running WordPress 4.8.5, so did not have wp-codemirror. WorkaroundUpdating the installation at qw and reloading the cached requests resolved the problem. Proposed solutionChange https://github.com/WordPress/gutenberg/blob/master/components/code-editor/index.js
to determine the URL |
Found the same discrepancy yesterday. on localhostOn localhost, we have a virtual host "localweb" with one WP installation in project-3: In the WP Settings/General panel, we have:
The erroneous call to load the code mirror script (and other modules) is:
...erroneous as there is no WP installation under "localweb". It should be:
on hosted serverThe problem is similar when hosted on a distant server, with WP installed in a subdomain called "dbl":
The erroneous call: Should be: final noteThe code found in gutenberg/components/code-editor/index.js appears indeed related to this problem as it also correlates the first screenshot provided in issue #5381. |
Is this not in a project or milestone yet? The HTML block is pretty primal in our usage, would greatly appreciate if it was fixed soon :) |
To clarify/summarise this issue: Right now we naïvely load the Code Mirror assets by requesting |
We have a proxy setup where
Just an FYI as a consideration -- This does cause all sorts of other problems but it seems to be in a core merge proposal already |
Issue Overview
With 2.3.0 the Custom HTML block is not working at all.
Attempting to insert the block produces "This block has encountered an error and cannot be previewed."
Steps to Reproduce (for bugs)
Expected Behavior
Custom HTML block appears
Current Behavior
Possible Solution
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: