wpexplorer / wpex-blogger

Blogger Free WordPress Theme
GNU General Public License v2.0
5 stars 1 forks source link

Not compatible with Gutenberg #2

Closed Alex-JTI closed 2 years ago

Alex-JTI commented 3 years ago

The latest version 2.0 is installed on WP 5.1. When trying to edit existing posts - white screen, when trying to create new post: at each added block there is an error: "This block has encountered an error and cannot be previewed." There was no such issue previously on the older WP version.

From Chrome dev tools:

code-snippet.js:98 Uncaught ReferenceError: ClipboardJS is not defined
    at Object.<anonymous> (code-snippet.js:98)
    at i (bootstrap:19)
    at Object.<anonymous> (shared-ui.js:6)
    at i (bootstrap:19)
    at bootstrap:83
    at smush-sui.min.js?ver=sui-2-10-1:1
react-dom.min.js?ver=16.6.3:104 TypeError: l.escapeEditableHTML is not a function
    at save (enlighterjs.gutenberg.min.js?ver=4.4.1:2)
    at nt (blocks.min.js?ver=6.0.6:2)
    at at (blocks.min.js?ver=6.0.6:2)
    at editor.min.js?ver=9.0.11:55
    at hooks.min.js?ver=2.0.5:1
    at qt (blocks.min.js?ver=6.0.6:2)
    at $t (blocks.min.js?ver=6.0.6:2)
    at blocks.min.js?ver=6.0.6:2
    at Array.reduce (<anonymous>)
    at Gt (blocks.min.js?ver=6.0.6:2)
data.min.js?ver=4.2.1:1 Uncaught (in promise) TypeError: l.escapeEditableHTML is not a function
    at save (enlighterjs.gutenberg.min.js?ver=4.4.1:2)
    at nt (blocks.min.js?ver=6.0.6:2)
    at at (blocks.min.js?ver=6.0.6:2)
    at editor.min.js?ver=9.0.11:55
    at hooks.min.js?ver=2.0.5:1
    at qt (blocks.min.js?ver=6.0.6:2)
    at $t (blocks.min.js?ver=6.0.6:2)
    at blocks.min.js?ver=6.0.6:2
    at Array.reduce (<anonymous>)
    at Gt (blocks.min.js?ver=6.0.6:2)
wpexplorer commented 3 years ago

Hey.

These errors don't seem to be related to the theme, have you tried disabling 3rd party plugins to test?

That said, I just finished a much needed update for the theme - https://github.com/wpexplorer/wpex-blogger/commit/2c2a960f7ccf2da855b1a26d1166bd540695d381 - you can re-download the theme from our site - https://www.wpexplorer.com/blogger-free-wordpress-theme/ - and then go to Appearance > Themes > Add new and install the theme to override your version.

Here are some of the new enhancements:

AJ

Alex-JTI commented 3 years ago

I've read multiple threads where it was old theme related, that's why I posted it here.

But indeed, you were right, it was caused by "Enlighter - Customizable Syntax Highlighter" which was also auto-updated.

So thank you very much for pointing me in the right direction.

Also I have already tried new version of your theme. Much appreciated! Take a note that link on https://www.wpexplorer.com/blogger-free-wordpress-theme/ still points to https://wpexplorer-free-downloads.s3.amazonaws.com/wpex-blogger.zip which contains all files still dating back to 2017. Should I re-download it from GitHub instead?

Alex-JTI commented 3 years ago

Sorry to say, after installing 2.1 version form GitHub I get an error on the front page: Fatal error: Call to undefined function wp_body_open() in /wp-content/themes/wpex-blogger-21/header.php on line 26

wpexplorer commented 3 years ago

@Alex-JTI - This error would happen if your WordPress installation is very old. Make sure to keep WordPress up to date. This function was added back in WP 5.2 - https://developer.wordpress.org/reference/hooks/wp_body_open/ - the latest version is 5.6. It's a security concern if you don't keep WordPress updated and you could get errors like this with modern themes.

I did update the zip file on amazon. It's possible you browser was downloading a cached version. But I will re-upload it just incase ;)

wpexplorer commented 3 years ago

ps: I will be releasing a plugin this year to provide auto updates for our free themes. This way it's optional (a lot of people like to download our themes and rename them and don't want updates, so I will make this an optional plugin for those that do). We'll probably announce it via our newsletter once ready.