Plugin Author
berkux
(@berkux)
Hi elenis,
the error-message is:
“Failed to connect to 149.139.16.96: Permission denied”
So there is no JSON to process.
[jsoncontentimporter url=”http://149.139.16.96:8080/swb2-2/j_get_station_sum”%5D{numero}[/jsoncontentimporter]
works at my wordpress without any problem and displays “40”.
Also
http://149.139.16.96:8080/swb2-2/j_get_station_sum
can be accessed without problems.
So the point is: Is there something special with http://149.139.16.96:8080/… and it’s permissions?
Hi berkux,
thank you for the reply.
the problem is that in my deployment also [jsoncontentimporter url=”http://149.139.16.96:8080/swb2-2/j_get_station_sum”%5D{numero}[/jsoncontentimporter]
does not work, and gives the same error.
I am checking with my colleague that is managing the platform from which I should retrieve the json feed.
will come back to you when I will have more clues.
thanks
the unusual behaviour is that in the local deployment everything works fine, same theme, same plugins…
this is quite weird.
I am trying to figure out why, but I have no idea.
Hi Berkux,
now I am having the following error
JSON-Decoding failed. Check structure and encoding if JSON-data.
unsupported JSON-structure
please open ticket at ww.wp.xz.cn
Thanks for help.
Hi berkux,
sorry to come back again.
a. do you know if the server where wordpress is installed should have some specific permissions in order process the json call?
b. do you know if linux server hosting wordpress deployment has troubles with the base url such as http://%5Bipaddress%5D:port?
thanks a lot
elena
Plugin Author
berkux
(@berkux)
Hi,
my plugin is using “wp_remote_get” for retrieving the URL:
http://codex.ww.wp.xz.cn/Function_Reference/wp_remote_get
With my wordpress this is working without problems.
Do you habe the newest wordpress version?
“JSON-Decoding failed” means that you get some text from the URL but not valid JSON.
What you can do:
Open class-fileload-cache.php:
Search for the method “decodeFeedData”
Add
echo $this->feedData;
before “if…”
This should show you what text the URL gives you.
Thank you,
I will try to do that.
however, as described previously, the weird thing is that from a local deployment (on my mac with mamp) everything works fine, your plugin allows me to retrieve data; but when installing the plugin in the server deployment (same theme, same plugins, etc.) it does not work. I tried also in another deployment installed in another server, twentytwelve theme and no plugins, but it does not work either.[ I have the last wordpress version 4.1.1 on all deployments]
I am trying to figure out which is the problem but I have no clue.
🙁
UPDATE
One of the problems in managing a json via your plugin have been solved asking the hosting provider to allow ip and port of the json.
Whilst, we are still working to solve the same issue on a server run in our lab.
thanks
Plugin Author
berkux
(@berkux)
Solved, see another thread.