Howdy, the plugin mostly works great, thanks. One issue is that I intentionally have WP articles that are old and never posted to Discourse. When any edit is made to those old WP articles, like fixing a typo, a new post is made to Discourse as if that WP article was brand new. That notifies our users about old content they don’t want to see.
The plugin gives you various options for deciding when content in Wordpress is posted to Discourse which also cover the publication of old posts. Firstly, check out the “Publishing” settings in WP Discourse which will set the default publication options. Then also check out the WP Discourse sidebar in the post itself when it’s being created or edited.
Hi, chiming in because I’m running into the same behavior as @samtuke and I can’t find a way around it.
If an editor corrects something, like a typo, in an old Wordpress article that wasn’t published on Discourse before, it gets published automatically as a new topic. I’d like to prevent this, and only publish newly written posts.
I guest I could add a hacky hook to check if post_ID > $lower_treshold_of_post_ID_I_want_to_publish, but perhaps there’s a better solution.
Thanks for sharing that. The reason existing articles are being published when they’re edited is probably because you have “Auto Publish” enabled, which means the “Publish post to Discourse” checkbox will be auto-checked in the editor.
Yes, that’s the reason, but the behavior I’d expect was to publish new articles, not edited ones. We are using Gutenberg.
I know I can disable the default behavior, and then manually selecting new posts to be published on Discourse, but I was hoping for a better resolution
already published to Discourse should be updated when edited
old articles should not publish to Discourse when edited
sounds a bit confusing.
Without no better understanding about coding than one hello worls test using Virtual Basic, I could guess it can be done comparing status of article against Discourse status, but such actions has tendency to slowing down admin side. Or that would be the situation at some time in pass
Thinking about settings that would be very confusing setup.
@ajolo2ky I understand why you might expect it to work that way, indeed this is something that has niggled at me for some time. The reason it hasn’t worked that way in the past is due to the complexities of supporting auto-publish across both Gutenberg and Classic editors. Many folks still use the Classic editor.
I looked at a possible improvement to the Gutenberg behaviour this morning and am hoping to get an update in the next version. In the meantime just uncheck “Publish to Discourse” or disable Auto Publish if you don’t want posts to be published in that scenario.
I’ll update you here if/when the next version is released with the updated behaviour. Hopefully in about a week from now.