# Cannot Post to Discourse instance, Published Category does not Display in settings

**URL:** <https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136>\
**Category:** WordPress\
**Created:** [2016 年 1 月 18 日午後 8:13 UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136 "2016-01-18T20:13:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Josiah\_Toppin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/josiah_toppin/32/121722_2.png) [@Josiah\_Toppin](https://meta.discourse.org/u/Josiah_Toppin)\
**Post date:** [2016 年 1 月 18 日午後 8:13 UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/1 "2016-01-18T20:13:14Z")

</div>

Hi all,

I’m receiving a number of different errors as per the logs depending on which page I’m on as per the following:

Posting a post:

> 2016/01/18 12:52:51 [error] 4319#0: \*3320 FastCGI sent in stderr: “PHP message: PHP Warning: First parameter must either be an object or the name of an existing class in /var/www/josiahtoppin.com/htdocs/wp-content/plugins/wp-discourse-0.6.6/lib/discourse.php on line 507” while reading response header from upstream, client: 142.229.86.182, server: [josiahtoppin.com](http://josiahtoppin.com), request: “POST /wp-admin/post.php HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “[www.josiahtoppin.com](http://www.josiahtoppin.com)”, referrer: “[http://www.josiahtoppin.com/wp-admin/post.php?post=8587&action=edit](http://www.josiahtoppin.com/wp-admin/post.php?post=8587&action=edit)”

Loading the plugin page:

> 2016/01/18 12:59:35 [error] 4319#0: \*3420 FastCGI sent in stderr: “PHP message: PHP Warning: Invalid argument supplied for foreach() in /var/www/josiahtoppin.com/htdocs/wp-content/plugins/wp-discourse-0.6.6/lib/admin.php on line 257” while reading response header from upstream, client: 142.229.86.182, server: [josiahtoppin.com](http://josiahtoppin.com), request: “GET /wp-admin/options-general.php?page=discourse HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “[www.josiahtoppin.com](http://www.josiahtoppin.com)”, referrer: “[http://www.josiahtoppin.com/wp-admin/options-general.php?page=discourse](http://www.josiahtoppin.com/wp-admin/options-general.php?page=discourse)”

And loading a post page:

> 2016/01/18 12:54:15 [error] 4319#0: \*3363 FastCGI sent in stderr: "PHP message: PHP Warning: First parameter must either be an object or the name of an existing class in /var/www/josiahtoppin.com/htdocs/wp-content/plugins/wp-discourse-0.6.6/lib/discourse.php on line 507

> PHP message: A valid URL was not provided" while reading response header from upstream, client: 142.229.86.182, server: [josiahtoppin.com](http://josiahtoppin.com), request: “GET /2016/01/we-shall-get-this-working/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “[www.josiahtoppin.com](http://www.josiahtoppin.com)”, referrer: “[Blog - Hello! I'm Josiah.](http://www.josiahtoppin.com/blog/)”

For some reason, I have a feeling that this may be linked to the way I have my wordpress/discourse configured in nginx, but who knows, I could be wrong on that front. For reference, I’m using a setup similar to this: [Nginx + discourse - #6 by wesochuck](https://meta.discourse.org/t/nginx-discourse/35444/6). This is also a similar problem: [https://meta.discourse.org/t/wp-discourse-dysfunctional-shows-only-start-the-discussion-at/36016/4](https://meta.discourse.org/t/wp-discourse-dysfunctional-shows-only-start-the-discussion-at/36016/4), but none of the suggestions there seemed to have helped with my case.

Discourse settings:  
Discourse URL   
Full url is set properly (http:// [discourse.josiahtoppin.com](http://discourse.josiahtoppin.com) (that space isn’t there, I can only post two links here as for being a new user)  
API Key

* * *

Publishing username   
Josiah.Toppin

I’ve regenerated the api key a number of times and have also ensured that the user posting the post has the correct Discourse username setup in the discourse environment. I’m at a bit of a brick wall at this point.

SSO is working properly using the separate plugin. SSO using this plugin seemed to break things.

---

_[View the full topic](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136)._
