Do you get an error when you attempt to publish any post to Discourse, or is the problem just happening with a particular post?
It seems unlikely that upgrading the Discourse 2.6.0.beta1 is the cause of the issue. Were there any changes made to your WordPress site around the time that the plugin stopped working for you?
It might be worth generating a new API key from your Discourse Admin / API page. Make sure the key is a Global Key (allows all actions.) Also make sure that the Publishing Username is set correctly on the WP Discourse Connection settings tab. Since you are able to link to existing Discourse topics, but not publish new topics to Discourse, it seems possible the issue is related to API permissions.
One final thing to check is to see what values are getting set for the post custom fields when you attempt to publish a post from WordPress to Discourse. If you enable custom fields in the editor, you should see something similar to this at the bottom of the editor:
So am I, but it really isn’t showing anything at all. If it were it would be a 400 error (as that’s what’s reported in production.log), but it’s not.
Update: having grovelled through the code I can see there won’t be an error - it’s all caught; if you enable email reports (email but no error_log()?) it tells you:
Reason for failure:
A 400 response code was returned from Discourse.
Bad Request
but that’s it.
Already done that, no difference. It was a last resort - the “last used” timestamp got updated on the previous key when I tried to publish so I knew that hadn’t changed somehow, but I thought it was worth a go.
publish_post_category: 23
update_discourse_topic: 0
wpdc_publishing_error: Bad Request
wpdc_unlisted_topic: 1
That’s it. Oh, and before you ask, it does the same if I don’t set “Publish as Unlisted” but with the expected difference in post meta.
I’m not sure what could be causing the 400 response. Could you try installing Health Check & Troubleshooting – WordPress plugin | WordPress.org English (Canada) and see if it reports any issues with your WordPress site. When that plugin is activated a “Site Health” entry will be added to the Tools section of your WordPress dashboard. Clicking that link then going to the Status tab might show some useful details.
The Health Check plugin also allows you to temporarily disable plugins for just your own session. This could be useful to see if the issue is related to conflict with another plugin - if you have any security related plugins installed on your site, it might be worth seeing if disabling them fixes the issue.
Unfortunately I’ve hit a dead-end. The Health Check plugin suggested nothing useful (unsurprising), and everything else is working perfectly.
I’ve run into the CSRF error when I was automating sending invites and it means you made a mistake in your code; however, in this case the plugin hasn’t changed, so my conclusion is that 2.6.0.beta1 is broken.
I know that’s not a popular conclusion, but it’s the only one I have right now.
Edited to add: I used the Health Check plugin to disable all other plugins - no difference.