• 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 6 years, 3 months ago by James.
    • This topic was modified 6 years, 3 months ago by James. Reason: Add WP version when problem started and has continued through subsequent WP versions
Viewing 15 replies - 31 through 45 (of 77 total)
  • Thread Starter James

    (@exelejames)

    @gretche I’m not quite sure how to achieve what you’re asking.

    Sounds to me like your issue is different from mine, though. I recommend creating a separate topic.

    I had the same issue in Gutenberg editor and in Elementor’s text and toggle widgets. After reading some posts about Cloudfront header caching, I changed my Cloudfront behavior for wp-login.php to pass ALL headers to Origin and I am working again!

    Thread Starter James

    (@exelejames)

    Glad to hear it @gregsh303!

    I’m happy to report the same, our site’s editor is working again ??

    I asked our host to look into this issue of header caching and he gave me the following explanation and solution:

    I added the following to the functions.php file in the theme. Researching it I found that WP does an odd thing in looking at the UserAgent to determine if it should show the editor or not. […] A CDN strips the UserAgent out to improve caching, so the following code forces it to be shown. […]

    function richedit_wp_cloudfront () {
       add_filter('user_can_richedit','__return_true');
    }
    
    add_action( 'init', 'richedit_wp_cloudfront', 9 );

    I can confirm it’s fixed now.

    Fixing your headers in CloudFront should take care of this, or utilize the above code in your theme’s functions file (YMMV, of course).

    Many thanks to @designsimply for so much help, here and on GitHub. And a thank you to @g3luka for suggesting that headers and CloudFront behaviors were the issue!

    • This reply was modified 6 years, 2 months ago by James.

    Tried to edit my front page with custom html and then it didn’t work.
    So I tried to go back to Visual Editor and it will not render any choices to do this.
    Very bad update.
    Waste too much time to relearn stuff?
    If it ain’t broke why are you changing it?
    So disappointed
    Confusing
    No relevancy with tasks & navigation

    You need to install “classic editor” plugin. This will disable “gutenburg changes”. This has fixed the issue for me.

    This may be a longshot solution and a very specific scenario for some, but it turns out if your user profile is missing a nickname, the visual editor doesn’t show correctly. I’m not sure exactly what the connection would be between the two, but it sounds like a bug.

    The reason my user didn’t have a nickname even though it’s required upon creation was because I created myself as a user directly in the database. This isn’t a common case for everyday WordPress users, but it might be good to verify that all required fields are filled out in the profile section.

    not working for me.. thanks for all the hel provided.

    Hi all,

    Try testing this with a different admin user. In my case it worked and I think it’s related to the problem spencerfcloud mentioned above.

    To make sure, I recreated my admin user. Not from the DB, but by using a different admin user. This way you make sure all the user meta data is stored correctly. Probably it can also be done programatically by using the wp_insert_user() function.

    Best of luck!

    I have an issue inside the Text Block Element. I just go to User and uncheck the “Disable the visual editor when writing” and it works. hope it helps!

    @spencerfcloud
    That was it, adding the nickname to my admin profile fixed everything.
    You totally saved my day!

    @jasurdeury Glad I could help!

    amybartlett

    (@amybartlett)

    I’m throwing this reply in here for non-coders like me to break through the “greek” bc this was a VERY debilitating issue…AND A VERY SIMPLE, BOX-UNCHECK SOLUTION…that I almost didn’t understand hidden in a thread of bakery / css / cloudfront references. Super helpful dialogue and it did lead me to solution so thankyou!!! I just didn’t understand it for hours.

    For dummies (like me)….:) ….
    1). GO TO PROFILE
    2). UNCLICK DISABLE VISUAL EDITOR

    you are done; blocks returned.
    (24 hours of research for this – sigh).
    ab

    @arabnas

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

    @amybartlett

    For dummies (like me)….:) ….
    1). GO TO PROFILE
    2). UNCLICK DISABLE VISUAL EDITOR

    And if it’s already unticked, tick it and save your profile settings then untick and save again.

    Not sure why — though possibly a plugin update causes it — the visual editor setting is lost by the database so has to be reset.

    @spencerfcloud I found that the nickname was the issue for me as well. Or at least appears to be. Here are the steps that worked for me.

    Edit user profile
    Checked “Disable the visual editor when writing”
    click Update Profile – throws error about nickname.
    Enter nickname and Update Profile
    Un-checked “Disable the visual editor when writing”
    Update Profile

    Another way to resolved it. I’m using WP Bakery and I my website on CloudFlare. The problem was the settings for the SSL on CloudFlare. Make sure that it’s set on “Full”.

    In my case the “UNCLICK DISABLE VISUAL EDITOR” didn’t worked but the settings on ClouFlare did.

Viewing 15 replies - 31 through 45 (of 77 total)
  • The topic ‘Block editor no longer working: only shows HTML’ is closed to new replies.