EnlighterJS / Plugin.WordPress

:package: Official WordPress Plugin of EnlighterJS
http://wordpress.org/plugins/enlighter/
GNU General Public License v2.0
115 stars 17 forks source link

Unable to edit posts when EnlighterJs is enabled #317

Closed Monotoba closed 3 years ago

Monotoba commented 3 years ago

I have used EnlighterJs for some time now and find it very helpful in formatting and highlighting code snippets in my posts. However, just last night I ran into a snag. I wrote a new post with lots of code and then previewed the post. The preview never loaded and when I tried to return to the editor the post would not load. I disabled all my plugins until I got to EnlighterJs. POnce disabled the post would load in the editor. I have the latest version of WordPress. The console shows these errors: Uncaught (in promise) TypeError: Cannot read property 'replace' of undefined at Module.f (escape-html.min.js?ver=f7b0e4c8bb987c1ab79bdda0d9db465b:2) escape-html.min.js?ver=f7b0e4c8bb987c1ab79bdda0d9db465b:2 at save (enlighterjs.gutenberg.min.js?ver=4.4.1:2) at qt (blocks.min.js?ver=94ae7f5a0fa088eb1cb5e8b7a601a5eb:3) at Ut (blocks.min.js?ver=94ae7f5a0fa088eb1cb5e8b7a601a5eb:3) at block-editor.min.js?ver=a5482da84276f82419126932713bda2f:12 at hooks.min.js?ver=b4778690e29d8a2b7518413652ba30c4:2 at Vr (blocks.min.js?ver=94ae7f5a0fa088eb1cb5e8b7a601a5eb:3) at Rr (blocks.min.js?ver=94ae7f5a0fa088eb1cb5e8b7a601a5eb:3) at blocks.min.js?ver=94ae7f5a0fa088eb1cb5e8b7a601a5eb:3 at Array.reduce ()

I should note that EnlightenJs is used on many pages and the other pages load fine with Enlighten enabled. So, perhaps this is a corrupt page issue? If so, any ideas on how to solve the issue without losing content?

Thanks for your response

AndiDittrich commented 3 years ago

Hi @Monotoba ,

indeed, that sounds like a corrupted page/block state. just extract the content in html mode and create a new post