• Resolved ALB13

    (@alb13)


    Hi folks, great plugin. Managed to pull data from Airtable onto my website with about 30 minutes of figuring out the template language. Awesome stuff.

    The problem I have is that I get the following error. Interestingly though, ALL of the data loads just fine below it. I’m seeing no errors on the page editor / preview, nor am I seeing any errors in debug mode. The error only shows up in page preview mode right above my perfectly rendered JSON data!

    We have a Problem with JSON here:
    Either we got no JSON from the API. Or the basenode-parameter is not ok.
    Switch on the Debugmode of the Plugin!

    Any thoughts? Thanks!

    Al

    • This topic was modified 4 years, 10 months ago by ALB13.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    Thank you for using my plugin.
    By adding debugmode=10 you get some detailinfo.
    You might switch to
    https://jsoncontentimporter.freshdesk.com/widgets/feedback_widget/new?searchArea=no
    There you can post confidentially the url or json you got.

    Bernhard

    Thread Starter ALB13

    (@alb13)

    I think I’m good. Not sure what happened but it’s working now. Thanks for the quick reply!

    Thread Starter ALB13

    (@alb13)

    Oh, but I did notice one very strange behavior (unrelated to this post).

    Whenever you put the word “Description” in the template, the JSON load will throw an error in the preview pane. Doesn’t matter if “description” is plain text, a part of a JSON field, or anywhere. It fails the page. Very strange.

    I think it was actually “descript” that was the problem. I had a field called “Short Description” that kept causing the page to fail every time it was in there. I changed it to “Short Desc” and it works fine now. I also just typed “descript” into a text area in the template, and it failed again.

    Cheers,
    AL

    Plugin Author berkux

    (@berkux)

    Hi,

    try this:

    Description[jsoncontentimporter url=https://api.json-content-importer.com/extra/json/1.json kbasenode=pricing_plans]
    Description{subloop-array:pricing_plans:-1}
    {subloop:pricing_plans.data:-1}Description: {pricing_plans.data.created_at}{/subloop:pricing_plans.data}
    <hr>Description
    {/subloop-array:pricing_plans}Description
    [/jsoncontentimporter]

    This works for me.
    So this might depends on the JSON you use. If the name of JSON-field is not existing in some arrays this might cause errors.
    If you can, you can post the JSON and the used shortcode at
    https://jsoncontentimporter.freshdesk.com/widgets/feedback_widget/new?searchArea=no
    for confidential analysis.

    Thanks
    Bernhard

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘We have a Problem with JSON here’ is closed to new replies.