WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: JSON Data Shortcode] Doesn't pull in json data to page/post

[Resolved] [Plugin: JSON Data Shortcode] Doesn't pull in json data to page/post

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Dean
    Member

    @ddean

    JSON data is cached according to the “lifetime” param, or 30 minutes by default. Have you waited long enough for the data to expire?

    davebos
    Member

    @davebos

    David,

    Does the shortcode still work with version 3.4?

    I can’t get the shortcode to output anything on my site. Will it return an error or just stay blank if it doesn’t find the key? I am not sure that I am formating the key correctly. Can you give me a sample of properly formatted shortcode with a live json feed?

    Thanks!!!

    Plugin Author David Dean
    Member

    @ddean

    Hi davebos,

    The shortcode is working for me on 3.4.2. The shortcode doesn’t output anything if the key isn’t found, but you can see any errors by enabling debugging in WP.

    Here’s the code I use to test:

    [json src="http://developer.yahooapis.com/TimeService/V1/getTime?appid=YahooDemo&output=json" lifetime="30"]At the tone, the time will be: {Result.Timestamp}[/json]

    Let me know whether that works on your install!

    – David

    Hiya David, I installed 3.4.2 on my localhost, then installed your plugin manually, and it shows up fine in my plugins panel. It also shows the correct description.

    I’ve tried dropping in your exact code from the post above (the yahoo timeservice) and nothing shows up for the timestamp. I’ve plugged the src url into a browser and the Yahoo service appears to be fine. Any ideas what might be happening?

    Thanks mate!

    Hi again, sorry for the trouble! A bit more info: I’ve turned on wordpress debugging and it’s telling me the selected key can’t be found. I’ve tried Result by itself and Timestamp, but no dice. I’ve also tried it with a feed on Petrescue and I can’t pull the data out of the results there either.

    Thanks!

    Plugin Author David Dean
    Member

    @ddean

    Hi bakedbeing –

    Thanks for reporting this!

    I see what you mean. I have a couple test environments and I’m able to reproduce this problem on one of them. Let me take a look and see what I can find.

    – David

    Plugin Author David Dean
    Member

    @ddean

    Hi @bakedbeing

    If you copy and paste the above code, make sure the ampersand isn’t being escaped. I’ll be releasing a new version shortly that will take care of this on the fly.

    Thanks for reporting this issue!

    – David

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: JSON Data Shortcode] Doesn't pull in json data to page/post’ is closed to new replies.