• Resolved friendlyfire

    (@friendlyfire)


    I have a site that is using this plugin (1.2.17) and the native wp rest api (tested on wp 4.7.3 and 4.7.5).

    When I try to fetch pages with params: https://mysite.com/wp-json/wp/v2/pages?order=desc&orderby=id&page=1&per_page=30

    I get:

    Something went wrong fetching URL with JSON-data: A valid URL was not provided.error: get of json-data failed – plugin aborted: check url of json-feed<hr>problems with JSON-structure: check basenode-param<hr><br>please open ticket at www.remarpro.com<hr>

    however, if I remove the per_page param:
    /wp-json/wp/v2/pages?order=desc&orderby=id&page=1

    I get a lists of posts

    if I use /wp-json/wp/v2/pages?per_page=12

    I get a list of posts.

    If i use: /wp-json/wp/v2/pages?per_page=20

    I get the error again.

    It looks like anything over the amount of 20 posts triggers the error. Why your plugin is giving an error on the wp endpoint is a mystery. It’s only happening on the pages endpoint.

    • This topic was modified 7 years, 5 months ago by friendlyfire.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author berkux

    (@berkux)

    Hi,

    the errormessage is “problems with JSON-structure: check basenode-param”.
    This comes up when the retrieved JSON is neither object nor array.

    Can you check if your JSON-Feeds are valid. You can do this e.g. with
    https://www.jsoneditoronline.org/

    Sometime Plugins like WP-Supercache add some data so that invalid JSON is created.

    You can open a ticket at
    https://json-content-importer.com/legal-contact/
    there you can post me the real URL in private.

    Bernhard

    sus

    (@susgeek)

    Is there a way to strip any data from a caching plugin?

    • This reply was modified 7 years ago by sus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error when using with the wp rest api’ is closed to new replies.