I recently encountered this error when trying to add or edit custom post type on a website, the exact error reads “The editor has encountered an unexpected error. Attempt Recovery Copy Post Text”
First I thought it was a cache issue on the site but it wasn’t, so the second thought was Guttenberg issue since it started to show up after the site was updated to recent WordPress version 5.9.
Below are the steps I took to find what was causing the issue and fix it.
Steps to fix The editor has encountered an unexpected error
The first action I did was to install classic editor plugin, I did this to confirm if actually it was Guttenberg editor that was causing the issue. see how to install WordPress plugins incase you don’t.
After installing the above plugin, the pages, posts starting to work as normal and the issue was fixed, that confirmed to me it was Guttenberg issue.
The next thing I did was to check if there were any updates available on the site as I thought it might be a plugin conflict, so I decided to disabled classic editor and then do the updates one by one as I check the page add or edit function.
I took the site backup always important to do so before making any updates or doing any major changes on your WordPress site. I performed the update and the first update I did was Yoast SEO plugin.
After updating Yoast plugin adding post or pages starting to work as normal, so that conformed my suspicion about plugin conflict. I went a head to do the other plugin updates that were available and then removed classic editor.
Points To Note:
I removed classic editor because it wasn’t necessary to be used on the site since the issue was plugin conflict which was fixed by doing plugin updates.
If you try plugins updates and still no solution, I would recommend activating classic editor plugin and use it in that case.
Always ensure your themes, plugins and wordpress versions are always up to date to avoid experiencing this kind of issues as well as more importantly for security purposes.
I hope this help you with solving this issue The editor has encountered an unexpected error. If you have any questions, comments and if this article helped you kindly let me know on the comments below. Thanks