# New Discourse post only created on update of WP post

**URL:** https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907
**Category:** WordPress
**Created:** [6월 14, 2018, 5:39오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907 "2018-06-14T17:39:33Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 14, 2018, 5:39오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/1 "2018-06-14T17:39:33Z")

</div>

When I first create a new post in Wordpress, it’s no longer auto-posting to Discourse. (Yes, the checkbox is selected.) It posts immediately if I click “update” on the post in Wordpress, though.

There’s no error when I first publish the post, but I also don’t see the notification banner saying that it was successfully published to Discourse at the top of the Wordpress editor page until I click update.

Any idea what could cause this, @simon?

---

<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: [6월 14, 2018, 5:49오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/2 "2018-06-14T17:49:20Z")

</div>

Did this start happening after updating the plugin?

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 14, 2018, 5:59오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/3 "2018-06-14T17:59:19Z")

</div>

Well, I’m sorry to say that since this is still in staging, and I haven’t been using it much, I can’t say when it started. All I can say is that it was working correctly a month ago, and now it doesn’t. I’ve run updates when they pop up, but I have no idea what’s been updated. Is there any way of seeing a history of that in WP?

I’ve also probably installed other plugins since then. FWIW.

I can tell you that I’m running v1.6.5

---

<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: [6월 14, 2018, 6:46오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/4 "2018-06-14T18:46:39Z")

</div>

This is probably being caused by a conflict with your theme or another plugin on your site. Can you share any details about your site’s theme and the plugins you have installed?

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 14, 2018, 6:52오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/5 "2018-06-14T18:52:07Z")

</div>

Thanks. That’s what I figured. I’m using Extra from Elegant Themes, and that’s been updated recently. Then I’m using a bunch of plugins, most of which are pretty standard. A few of them are more unique, though. I’ll run down the list and see if I can find the conflict.

---

<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: [6월 14, 2018, 6:59오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/6 "2018-06-14T18:59:14Z")

</div>

Thanks! If you find out what is causing the problem, please let us know.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 19, 2018, 4:31오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/7 "2018-06-19T16:31:45Z")

</div>

I believe I’ve been able to narrow this down to a simple incompatibility with the Social Warfare plugin:

> **[Social Sharing Plugin – Social Warfare](https://wordpress.org/plugins/social-warfare/)**
>
> The most beautiful, responsive, lightning fast social share buttons built to boost shares and drive more traffic without slowing down your site.

It’s a pretty popular plugin, and personally I’d really like to keep using it. I’m also fairly certain that the problem cropped up in a recent update, either to it or the Discourse plugin. Is there any chance of getting it fixed? Any other information I can provide? Logs I can look at?

Thx.

---

<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: [6월 20, 2018, 7:13오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/8 "2018-06-20T19:13:26Z")

</div>

I’ve installed the Social Warfare plugin on my local development site. Unfortunately, I have not yet been able to replicate the problem that you are having. Looking at the plugin’s code, I can see something that might be causing a problem for you, so I’ll look at it some more and try to reproduce the error.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 20, 2018, 7:14오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/9 "2018-06-20T19:14:44Z")

</div>

Perhaps a combination of settings? I’d be happy to provide screenshots of how I’m setup if you want.

---

<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: [6월 20, 2018, 7:20오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/10 "2018-06-20T19:20:39Z")

</div>

> [@jtbayly](#):
>
> I’d be happy to provide screenshots of how I’m setup if you want.

That would be great. The plugin hooks into the WordPress `save_post` action in a few places. Depending on the order in which functions are being called, this could cause a conflict with the Discourse WordPress plugin.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 20, 2018, 8:02오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/11 "2018-06-20T20:02:09Z")

</div>

Here you go. No SSO in use. First majority of [WP Discourse](https://github.com/discourse/wp-discourse) settings and then Social Warfare ones. And let me know if you want anything from the actual Discourse instance. I’m assuming that is irrelevant. (Also other settings that I left out.)

 ![WP%20Discourse%201](https://global.discourse-cdn.com/meta/original/3X/b/2/b284a407ed37a7324e8daadd5c4d3c432e22a573.png)

 ![WP%20Discourse%202](https://global.discourse-cdn.com/meta/original/3X/d/8/d8d59644679eecb03778d12cefbf4b335f8d4339.png)

 ![WP%20Discourse%203](https://global.discourse-cdn.com/meta/original/3X/e/c/ecf4f73cd8d15c8a8850f721d1353cfa0663f9f1.png)

 ![Social%20Warfare%201](https://global.discourse-cdn.com/meta/original/3X/f/b/fbfec7355cf1a178b9aedcf88f1f90ff5722f699.png)

 ![10%20PM](https://global.discourse-cdn.com/meta/original/3X/3/6/362d1cb40ee30a63abc52ce4d421f3789bb1951a.png)

---

<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: [6월 22, 2018, 10:32오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/12 "2018-06-22T22:32:42Z")

</div>

I still can’t reproduce this. If you can confirm that when the Social Warfare plugin is deactivate you can successfully publish posts to WordPress, I’ll install the plugin on a live site and test it out next week.

---

<div class="post-metadata">

### Author: ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)
#### Post date: [6월 27, 2018, 2:55오후 UTC](https://meta.discourse.org/t/new-discourse-post-only-created-on-update-of-wp-post/89907/13 "2018-06-27T14:55:41Z")

</div>

Just a quick update.

First, I disabled, deleted, reinstalled and reconfigured the WP-Discourse plugin. The problem persisted. Posts only made it to Discourse after hitting “Update,” not upon first publishing the post.

Second, I disabled all plugins, re-enabled only the WP-Discourse plugin, and confirmed that posting works properly right away on hitting “Publish.”

Third, I added just Social Warfare to the mix and the problem did _not_ return. This is contrary to my previous results where I confirmed that the conflict was Social Warfare (using just the same method listed here, but without the first step). So I proceeded to further testing, re-enabling all the plugins a few at a time and testing each step of the way. **The problem never returned.**

Perhaps it has to do with the order that the plugins are enabled? Perhaps it was fixed by a recent update to one of the plugins? (But neither WP-Discourse nor Social Warfare have been recently updated.) So whatever the problem was, it seems to be gone. If it returns I’ll post back in here.
