WP-Discourse and "Quick Draft"

I have a wordpress user who has latched onto the Quick Draft in the Dashboard, but when she makes a quick draft and then goes back later to edit it, the post to Discourse checkbox isn’t checked and the category isn’t chosen. Is there any way to set the default for quick drafts to honor the settings for new posts?

Thanks :slight_smile:


Yes, I can reproduce that. I would expect the publish category to be set to the Default Discourse Category and the Publish to Discourse checkbox to be checked if the Auto Publish setting has been enabled. This is the way it works when a regular draft is created. I’ll see what’s going on with quick drafts.

1 Like

Thanks for reporting this! The issue is that the code that sets the Publish category and Publish to Discourse metadata for a post isn’t run when a Quick Draft is saved. There will be a fix for this in the next update of the plugin. It will be available in the WordPress repo early next week. When a Quick Draft is saved, the Publish to Discourse status will be set to true if the Auto Publish setting is enabled, the publish category will be set from the Default Discourse Category setting.


Awesome! Thanks for the quick fix.

This should be working now in the latest release of the plugin (version 1.6.6.)

1 Like

I’m wondering about a similar issue. We have drafts that were created prior to the WP-Discourse plugin being installed. Upon editing these posts, they do not have the expected default settings wrt Discourse.

That’s because for existing drafts the posts and their options have already been set. Defaults will only apply to posts created thereafter. WP-Discourse can’t differentiate between posts where options weren’t explicitly set, vs posts created and the options disabled. It’s the difference between setting a default vs overriding for all posts (and understanding the consequences/edge cases where this might be undesirable).

1 Like

I would expect there to be a difference between null and false.

Besides, the option is not set to the wrong category already, but one is chosen seemingly at random upon opening that draft.

Not a big deal, but I wanted to mention it.

1 Like

Yeah, I can see what’s happening now. The plugin assumes that if a draft has been saved, that it was saved with the WP Discourse plugin activated. If the plugin wasn’t activated when the draft was saved, the default category won’t be selected from the category dropdown. I can fix that.