• Resolved wpsametaslan

    (@wpsametaslan)


    Once I activate the plugin (free version ) the REST API gets broken. Adds the following code right before the JSON when you visit yourdomain.com/wp-json/wp/v2

    //after activating the plugin
    <html><body></body></html>{JSON}
    
    //after deactivating the plugin
    {JSON}

    This behaviour pretty much kills every REST API Call because you always get the error “Unexpected Token ‘<‘” since REST expects JSON.

    Any idea how to avoid this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Alexandru Tapuleasa

    (@talextech)

    Is that for a specific API request? I tested it just now for /, /posts, /users and everything seems OK. No html is injected in the response ??

    Thread Starter wpsametaslan

    (@wpsametaslan)

    Hey Alexandru,

    it happens for the following Request -> wp-json/wp/v2
    yourdomain.com/wp-json/wp/v2

    Thank you!

    Thread Starter wpsametaslan

    (@wpsametaslan)

    Just rechecked – happens for all request actually. Only after deactivating WP External Links everything start to work again.

    I have the Same error. have you found an solution?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin breaks REST API – wp-json/wp/v2’ is closed to new replies.