Getting an error when posting


(Kaylin) #1

Everytime I try to post an article in Wordpress, I end up with the following errors:

Warning: file_get_contents(forum.jk-junkies.com/posts): failed to open stream: No such file or directory in /homepages/1/d563246168/htdocs/blog/wp-content/plugins/wp-discourse-master/lib/discourse.php on line 469

Warning: First parameter must either be an object or the name of an existing class in /homepages/1/d563246168/htdocs/blog/wp-content/plugins/wp-discourse-master/lib/discourse.php on line 474

Warning: Cannot modify header information - headers already sent by (output started at /homepages/1/d563246168/htdocs/blog/wp-content/plugins/wp-discourse-master/lib/discourse.php:469) in /homepages/1/d563246168/htdocs/blog/wp-admin/post.php on line 233

Warning: Cannot modify header information - headers already sent by (output started at /homepages/1/d563246168/htdocs/blog/wp-content/plugins/wp-discourse-master/lib/discourse.php:469) in /homepages/1/d563246168/htdocs/blog/wp-includes/pluggable.php on line 117877

Any ideas what I’m doing wrong here?


Wordpress Posts hang with following error
(Ben Word) #2

Are you using the latest version of the plugin?


(Kaylin) #3

Yup. 0.6.3 Grabbed directly from GitHub


(Ben Word) #4

Related issues: Search · file_get_contents · GitHub

This is because the plugin isn’t generating good enough errors right now. Try verifying all of the plugin settings to make sure that they’re correct.

If you’re still running into errors at that point, try doing a var_dump($json); in lib/discourse.php on L472


(Dean Taylor) #5

This is a poorly implemented WordPress plugin - I would suggest the developer switch from using file_get_content to wp_remote_get for best practices.


(Ben Word) #6

Agreed, which is why lately I’ve started to help out. It would be awesome if others jumped in, too. I’d really appreciate a PR (or at least a GitHub issue) if you have a moment.

:+1: on switching to wp_remote_get


(Kaylin) #7

You’ve over estimated my technical knowledge. All my settings I’m pretty sure are correct, but I have no idea what ^that^ means.


(Kaylin) #8

I’m wondering if this might be the problem? Seems it should be looking for the file at /blog/wp-content/plugins/wp-discourse-master/lib/discourse.php

Thoughts @benword, @DeanMarkTaylor?


(Dean Taylor) #9

Only guessing…
It’s trying to load a file forum.jk-junkies.com/posts and this should probably be something like http://forum.jk-junkies.com/posts so perhaps in the settings for the plugin you need to include the extra http://.


Wordpress Posts hang with following error
(Kaylin) #10

Holy smokes man! You nailed it! Thanks a ton!