# 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:** [January 18, 2016, 8:13pm 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:** 8
**Page:** 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: [January 18, 2016, 8:13pm 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.

---

<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: [January 24, 2016, 9:12pm UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/2 "2016-01-24T21:12:05Z")

</div>

Hello everyone; I’ve played around with a few different nginx configurations and that hasn’t helped. I’ve taken a look at the firewall rules I have set up and that doesn’t _seem_ to be an issue, but I’m not an expert when it comes to iptables. I will do a bit more testing and see if I can’t resolve. For some reason, I think it might be related to my firewall, but I can’t be sure.

---

<div class="post-metadata">

### Author: ![Grex315](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grex315/32/115868_2.png) [@Grex315](https://meta.discourse.org/u/Grex315)
#### Post date: [January 24, 2016, 11:32pm UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/3 "2016-01-24T23:32:36Z")

</div>

With fastcgi errors might want to check you php.ini settings. Do you have  
furlopen set to 1? Also I noticed it’s trying to open both  
[www.josiahtoppin.com](http://www.josiahtoppin.com) and [josiahtoppin.com](http://josiahtoppin.com). Do you have DNS setup for the  
non-www address or are you doing a rewrite rule?

Just tying to think of things to check.

Do you use easy engine btw?

---

<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: [January 25, 2016, 12:12am UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/4 "2016-01-25T00:12:13Z")

</div>

I am using easy engine. I was about to jump in and try the other advice until I saw that you mentioned that and thought it would be pertinent to mention before delving deeper into this issue. @Grex315 I’m still learning discourse; do I need to mention people in replies?

Edit: Furl is on and dns is setup for the non-www address - www is added via wordpress site address.

---

<div class="post-metadata">

### Author: ![Grex315](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grex315/32/115868_2.png) [@Grex315](https://meta.discourse.org/u/Grex315)
#### Post date: [January 25, 2016, 3:07pm UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/5 "2016-01-25T15:07:15Z")

</div>

nah. dont think Easy engine would cause an issue just recognized the path setup. I use EE as well but just so i can get their NGINX repo. They have all the modules I want already built in. The rest I setup myself.

Have you try disabiling all other plugins.and just have this one going to see if there is a conflict? Also in the plug in settings for the category drop down is it showing a populated list of categories or is it blank? That would tell you if your API key is working and the plugin is connecting to your discourse instance,

---

<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: [January 25, 2016, 10:07pm UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/6 "2016-01-25T22:07:39Z")

</div>

Hmm. No joy on disabling plugins - still no go.

Nope, drop down is blank, so it is definitely not connecting.

Played around with some temp firewall rules and nothing seemed to do the trick. I’m at a bit of a wall here. I posted it over at rtcamp and opened an issue up on github in the mean time though.

---

<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: [January 26, 2016, 12:56am UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/7 "2016-01-26T00:56:44Z")

</div>

Well. Good news and bad news.

Good news is I got it working through the embeddable settings with an RSS feed and using this: [GitHub - arpitjalan/wp-discourse-embed: WordPress plugin that lets you use Discourse as the community engine for a WordPress blog · GitHub](https://github.com/techAPJ/wp-discourse-embed) plugin.

Bad news is I had to ditch the regular wp-discourse plugin for now.

Now if only I can figure out why the topics aren’t being posted to the specified category in my embeddable settings. That is for another topic though.

---

<div class="post-metadata">

### Author: ![Grex315](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/grex315/32/115868_2.png) [@Grex315](https://meta.discourse.org/u/Grex315)
#### Post date: [January 26, 2016, 3:40am UTC](https://meta.discourse.org/t/cannot-post-to-discourse-instance-published-category-does-not-display-in-settings/38136/8 "2016-01-26T03:40:48Z")

</div>

Ok. Glad you got something to work.

I was going to suggest was using and admin account or just putting system  
in as the username creating the posts.
