# Cannot edit posts/pages with WP-Discourse enabled

**URL:** https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787
**Category:** WordPress
**Created:** [November 30, 2020, 7:58pm UTC](https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787 "2020-11-30T19:58:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![timgrahl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timgrahl/32/165663_2.png) [@timgrahl](https://meta.discourse.org/u/timgrahl)
#### Post date: [November 30, 2020, 7:58pm UTC](https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787/1 "2020-11-30T19:58:31Z")

</div>

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](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?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [December 8, 2020, 12:01am UTC](https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787/2 "2020-12-08T00:01:09Z")

</div>

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](https://github.com/discourse/wp-discourse/pull/381)

Let me know how that goes.
