Support » Fixing WordPress » Block editor no longer working: only shows HTML

  • Resolved James

    (@exelejames)


    I’ve made lots of changes to my WordPress site recently and now the block editor (i.e. Gutenberg) does not work, nor can I see the Visual and Code tabs on the classic editor when I have the classic editor plugin installed. Here’s the (related?) changes I’ve made, as best as I can remember:

    • Installed the new Gutenberg plugin
    • Installed the classic plugin
    • Added & Connected Jetpack to my site (self-hosted)
    • Removed and Added Jetpack, Gutenberg, and Classic editor plugins many times while debugging this issue

    Here’s a screenshot of my block editor, notice the block add button is greyed out:
    Can’t add blocks

    Here’s a screenshot of the post where only HTML is shown:
    Block editor stuck showing HTML

    The keyboard shortcut to switch between visual and code (CTRL-SHIFT-ALT+M) does nothing.

    When I installed the Classic Editor plugin to see if that helped, I can’t see the visual or code tabs:
    Classic editor plugin: no visual or code tabs. This was done in troubleshooting mode on 2019 theme and there were no JS errors in the console.

    Here’s some more information I’ve gathered and actions I’ve performed in troubleshooting all this:

    • First saw this issue in 4.9.8, upgraded to version 5.0.0, and now upgraded to 5.0.1. This is still a problem.
    • Run health check and have done all this with troubleshooting mode on and all plug-ins disabled
    • With troubleshooting mode enabled, there are no JS errors in the console
    • Verified that the option to disable the visual editor is unchecked for my user account
    • With Jetpack connected to the site, I was able to edit posts and pages using the Visual/Code editor (no Gutenberg, but I think that requires the plugin?). But editing posts and pages in wp-admin still showed the problems I’m describing. I worked through it with Jetpack support, but since it’s not really an issue with Jetpack I’ve migrated to the support forums.
    • Checked for related cases, and they either don’t apply or the solutions don’t work:

    I’d appreciate any assistance. I can do HTML, but I’d rather have access to HTML and the new block editor!

    I’m happy to include any more information that would be helpful.

    • This topic was modified 1 year, 1 month ago by James.
    • This topic was modified 1 year, 1 month ago by James. Reason: Add WP version when problem started and has continued through subsequent WP versions
Viewing 15 replies - 16 through 30 (of 67 total)
  • @exelejames this does seem to me like something related to your server setup or configuration but I am not sure what!

    I wonder, if you setup a test site at https://jurassic.ninja/ and delete all of the plugins and try creating a new post, can you see the block editor working in that environment?

    One more note, I saw that you noted another report of this at https://github.com/WordPress/gutenberg/issues/12927 and, in that case, they’ve made some notes about their server setup which may be relevant. They’ve noted that they are using an EC2 instance going through a load balance and through CloudFront with Route53 set to the domain.

    Do you have a similar setup by chance?

    Are you able to check your site using the IP the same way they did?

    I discovered the cause of my problem.

    I’m using the CloudFront, AWS CDN, and one of the behaviors was not passing the headers to the application.
    When changing this configuration in CloudFront, everything has returned to work.

    Anyway, thanks for the help.
    See you.

    arabnas

    (@arabnas)

    Hello,

    I got the same problem in a website and the problem was from user profile disabled visual editor.

    Try this https://www.wpbeginner.com/beginners-guide/how-to-remove-visual-editor-mode-in-wordpress/

    May be you have an issue or may be the visual editor just disabled from user profile options.

    Regards.

    James

    (@exelejames)

    Thanks @arabnas

    In my original post, I mention that I have verified that the option to disable the Visual Editor is unchecked:

    Verified that the option to disable the visual editor is unchecked for my user account

    James

    (@exelejames)

    Thanks @designsimply

    I ignored that solution since I didn’t really understand it and it looked like a long shot to me as well. But, I may as well try to understand and give it a try.

    I may still not understand enough about APC and what effect it has on my WP instance but the Health Check’s PHP information and the PHP manual’s APC configuration options seem to indicate I have the defaults in place. Here’s a screenshot of the segments and size properties for my site. apc.enabled is set to On.

    My guess is that the solution from that post doesn’t really apply to my situation.

    James

    (@exelejames)

    @designsimply

    They’ve noted that they are using an EC2 instance going through a load balance and through CloudFront with Route53 set to the domain.

    Do you have a similar setup by chance?

    Our site is run by a third-party host and they use AWS, but I’m not sure about much more than that. I don’t know of any load balancers. I plan to ask my host to get involved soon, probably after the holidays at this point ;).

    James

    (@exelejames)

    @designsimply, @g3luka

    I’ll be looking into CloudFront behaviors and headers with my host, maybe there is something to that? Thanks for the tips from both of you!

    designsimply

    (@designsimply)

    @g3luka thank you for posting the solution that worked for you!

    One of the behaviors was not passing the headers to the application. When changing this configuration in CloudFront, everything has returned to work.

    Can tell me exactly what setting you changed in your CloudFront configuration to fix the problem?

    Are the steps at https://aws.amazon.com/premiumsupport/knowledge-center/configure-cloudfront-to-forward-headers/ what you did?

    designsimply

    (@designsimply)

    @exelejames thanks for checking on your PHP APC settings. I was hoping since someone posted that solved the issue for them that it would also help you.

    Our site is run by a third-party host and they use AWS, but I’m not sure about much more than that. I don’t know of any load balancers.

    Aha! I hope this is a clue that helps. Since @g3luka didn’t mention load balancers, I’m not sure that’s relevant. I would definitely look into the part he mentioned about making sure headers are being passed to the application though. That does indeed seem relevant and may also apply to https://github.com/WordPress/gutenberg/issues/12927

    James

    (@exelejames)

    @designsimply, I’ll definitely check in on the headers and update here and GitHub with what I find. Thanks so much for all your work and suggestions!

    designsimply

    (@designsimply)

    Thanks for working through it! I would really like to help you resolve the issue!!

    mattsmith33

    (@mattsmith33)

    When adding a new post the html and visual editor are both missing.

    After the title, all there is the content block bit and no visual or html editor.

    Can anyone help?

    gretche

    (@gretche)

    I have same/similar problem. I’m running 5.0.2 and trying to edit content on a page. I switched on a ‘classic’ para to show html – and now can’t switch the para back to show the content.

    Just tried it again on a normal para – and I CAN switch from Edit Html to edit visually.
    Tried it on a classic para – and it worked as above.

    Don’t know why one classic para worked OK and another not.

    I’m trying to create a page of para’s. Each with an image floated right, and clear:both ready for the next para.

    What’s the best way in v5 of achieving this. I’m a developer and can code html, but the users (who will add/maintain content) are not.

    • This reply was modified 1 year ago by gretche. Reason: additional info
    James

    (@exelejames)

    @mattsmith33 Have you walked through the previous suggestions in this post yet?

    I’m especially curious to see if @g3luka’s suggestion works for anyone else (I’m still workin through this with my host and will post an update once I know).

Viewing 15 replies - 16 through 30 (of 67 total)
  • You must be logged in to reply to this topic.