• I recently upgraded to WordPress 5.4 and I’m not sure if that’s the direct cause but now my Gutenberg blocks are always failing to parse in the editor. It appears it’s trying to add a new class to my save function return code. The class is “wp-block-[My Block Namespace]-[My Block Title]”. When it does this it’s trying to add a second class attribute to a tag that already has a class attribute. I added a wrapper div tag and that at least solved the parsing issue but now it’s taking the classes from my original div tag and adding them along with it’s css class to the wrapper div causing my styles to be all messed up. Did something change with v5.4? I can’t seem to find reference to it anywhere. Or is something else going on.

    • This topic was modified 4 years, 11 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff

    (@macmanx)

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and switch to the default Twenty Twenty theme. If the problem goes away, enable them one by one to identify the source of the problem.

    If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.

    Thread Starter tonyd256

    (@tonyd256)

    The issue is a block I created in my custom theme. So I have to keep my theme active to test. I could still mess with the plugins I guess. Although, it seems like Gutenberg in the latest WordPress is the only player here. I downgraded my WordPress version to 5.3.2 and it works fine! So it has something to do with the 5.4 upgrade.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gutenberg blocks adding it’s own css v5.4?’ is closed to new replies.