Cannot edit posts/pages with WP-Discourse enabled

When I try to edit a post or page on my site, I get this error:

https://www.dropbox.com/s/6d2m9v1xbz6zsdb/Screen%20Shot%202020-11-30%20at%201.54.08%20PM.png?dl=0

When I click “Attempt Recover” it doesn’t do anything. When I click copy error, here is what it shows:

TypeError: Cannot read property 'split' of undefined
at DiscourseSidebar.buildPostState (https://mysite.com/wp-content/plugins/wp-discourse/admin/discourse-sidebar/build/index.js?ver=1606753320:1211:41)
at DiscourseSidebar.initializePostState (https://mysite.com/wp-content/plugins/wp-discourse/admin/discourse-sidebar/build/index.js?ver=1606753320:1192:43)
at new DiscourseSidebar (https://mysite.com/wp-content/plugins/wp-discourse/admin/discourse-sidebar/build/index.js?ver=1606753320:1124:29)
at Ag (https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:63:107)
at Vg (https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:89:442)
at ph (https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:217:70)
at lh (https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:126:409)
at O (https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:121:71)
at ze (https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:118:14)
at https://mysite.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:53:49

I’ve run troubleshooting so if I disable all other plugins/themes except for WP-Discourse, it’s still broken. If I enable all other plugins/themes except for WP-Discourse, then the site works fine.

I’m running the latest versions of both Wordpress and WP-Discourse.

Any ideas?

Thanks for reporting this Tim, and apologies for the delay in responding to you.

I’ve submitted a PR to the plugin repo that addresses it. When this is merged the plugin should work for you.

https://github.com/discourse/wp-discourse/pull/381

Let me know how that goes.