# 启用 WP-Discourse 后无法编辑帖子/页面

**URL:** <https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787>\
**Category:** WordPress\
**Created:** [2020 年11 月 30 日 19:58 UTC](https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787 "2020-11-30T19:58:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)\
发布日期： [2020 年12 月 8 日 00:01 UTC](https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787/2 "2020-12-08T00:01:09Z")

</div>

感谢你的反馈，Tim，很抱歉回复晚了。

我已向插件仓库提交了一个解决该问题的 PR。合并后，插件应该就能正常使用了。

> <https://github.com/discourse/wp-discourse/pull/381>
>
> @scossar \[This exception\](https://meta.discourse.org/t/cannot-edit-posts-pages-w…ith-wp-discourse-enabled/171787) is caused when the sidebar is loaded in a post type not supported by the plugin.
> 
> The background here is:
> 
> \- Meta fields such as \`\`wpdc\_topic\_tags\`\` are registered in \`\`setup\_options\`\` in \`\`discourse\_sidebar.php\`\`. This is where they are assigned a default value, i.e. an empty string.
> 
> \- If the post type is not allowed, this registration will not occur and the field will be undefined.

请告诉我结果如何。

---

_[View the full topic](https://meta.discourse.org/t/cannot-edit-posts-pages-with-wp-discourse-enabled/171787)._
