# WP Discourse "Update Discourse topic" error

**URL:** https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656
**Category:** WordPress
**Created:** [5월 29, 2018, 1:24오후 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656 "2018-05-29T13:24:18Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [3월 9, 2019, 3:30오전 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656/22 "2019-03-09T03:30:53Z")

</div>

Yes, I suspect that is what’s happening. Up until a [WP Discourse](https://github.com/discourse/wp-discourse) version 1.7.9, none of the shortcodes in your posts would have been displayed when the full post content was published from WordPress to Discourse. The change that allowed shortcodes to be parsed before a post is published was made to deal with the new markup that is added to the raw WordPress post by the Block Editor. I may need to look at changing that.

I think that for your case it would be best to publish excerpts of your posts and use the Discourse ‘Show Full Post’ button to display the full post. It is possible to get most content from WordPress to display in expanded posts by adding selectors to the `embed_whitelist_selector` Site Setting. Early next week I’ll publish a topic about how to set that up.

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [3월 9, 2019, 6:08오전 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656/23 "2019-03-09T06:08:10Z")

</div>

Is there any way to disable certain shortcodes from being parsed into the discourse topic?

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [6월 21, 2019, 7:54오전 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656/24 "2019-06-21T07:54:15Z")

</div>

Just a quick followup

I tried to update a post to display full post with removing any shortcodes based on the code snippet from here:

> [@WP Discourse plugin tips and tricks](https://meta.discourse.org/t/wp-discourse-plugin-tips-and-tricks/50757):
>
> This topic has a number of tips and tricks for users of the [WP Discourse](https://github.com/discourse/wp-discourse) WordPress plugin. Adjust the comments\_number sync period for WordPress archive pages To get the correct number of Discourse comments for a post, the plugin needs to periodically make an HTTP request to Discourse to get the current comments number. On single pages this period is set to be no more often than every 10 minutes. For archive pages the period is set to no more than once every 24 hours. The reason for this is to a…

Even then I get the good old error:

> A 422 response code was returned from Discourse.  
> Unprocessable Entity

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [7월 1, 2019, 1:46오후 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656/25 "2019-07-01T13:46:38Z")

</div>

@simon

Any idea how I can debug this?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [7월 2, 2019, 8:19오후 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656/26 "2019-07-02T20:19:00Z")

</div>

It’s tricky to know what the issue is without being able to see the actual post content that’s being passed to Discourse. Are you able to publish posts that don’t contain the shortcode?

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [7월 7, 2019, 1:56오후 UTC](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656/27 "2019-07-07T13:56:56Z")

</div>

Hey there

I can confirm that it works without the shortcode. With the shortcode in the content I am able to initally publish a post on discourse, **but I cannot update it**.

I set up a staging environment and can reproduce the issue

If you are interested, I can give you access via Pm

[이전 페이지](https://meta.discourse.org/t/wp-discourse-update-discourse-topic-error/88656.md?page=1)
