this is quite a common issue with htaccess file blocking malformed un-shlashed url such as cf7 wp-json requests.
Therefore check your .htaccess
file in your root folder to see if this is the case with your server too, find the section in your .htaccess
that is adding a “https://wordpress.stackexchange.com/” at the end of requests
# Add trailing slash to the end of the link
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|js|xml)$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301]
# End Adding trailing slash to the end of the link
and isnert the line RewriteCond %{REQUEST_URI} !^/wp-json
to escape wp-json requests just before the RewriteRule
Related Posts:
- “SyntaxError: Unexpected token < in JSON at position 0"
- SyntaxError: Unexpected token o in JSON at position 1
- SyntaxError: Unexpected token o in JSON at position 1
- What is JSONP, and why was it created?
- TypeError: Converting circular structure to JSON in nodejs
- Use a JSON array with objects with javascript
- Array of JSON Objects
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- Fetch: POST JSON data
- Uncaught SyntaxError: Unexpected token u in JSON at position 0
- Unexpected token u in JSON at position 0 (but only sometimes)
- How to read an external local JSON file in JavaScript?
- SyntaxError: Unexpected token o in JSON at position 1
- SyntaxError: Unexpected token o in JSON at position 1
- How to read an external local JSON file in JavaScript?
- What is the convention in JSON for empty vs. null?
- What is the “right” JSON date format?
- Nested JSON objects – do I have to use arrays for everything?
- Uncaught TypeError: Cannot read property ‘length’ of undefined
- What is the “right” JSON date format?
- How to compare arrays in JavaScript?
- Failed to load resource: net::ERR_FILE_NOT_FOUND loading json.js
- jQuery AJAX cross domain
- SyntaxError: Unexpected token o in JSON at position 1
- Uncaught TypeError: Cannot read property ‘props’ of null
- Loading local JSON file
- How to convert JSON object to JavaScript array?
- node.js TypeError: path must be absolute or specify root to res.sendFile [failed to parse JSON]
- Uncaught TypeError: data.push is not a function
- React Js: Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
- How to convert selected HTML to Json?
- How to get JSON from URL in JavaScript?
- How do you put an image file in a json object?
- push object into array
- JSON.parse() not working
- react router v^4.0.0 Uncaught TypeError: Cannot read property ‘location’ of undefined
- Refused to execute script, strict MIME type checking is enabled?
- TypeError: res.json is not a function
- SyntaxError: Unexpected token C in JSON at position 0 – Ionic 2 Http GET request
- SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
- Add new attribute (element) to JSON object using JavaScript
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- How to display raw JSON data on a HTML page
- Convert array to JSON
- JSON.parse unexpected token s
- JSON.stringify (Javascript) and json.dumps (Python) not equivalent on a list?
- How to filter JSON Data in JavaScript or jQuery?
- How to add a button dynamically using jquery
- Using setTimeout on promise chain
- Complex JSON nesting of objects and arrays
- Uncaught SyntaxError: Unexpected token with JSON.parse
- How can JavaScript save to a local file?
- Write / add data in JSON file using Node.js
- How do I handle newlines in JSON?
- Finding the max value of an attribute in an array of objects
- Defining a HTML template to append using JQuery
- “NS_ERROR_DOM_BAD_URI: Access to restricted URI denied”
- What are the differences between JSON and JSONP?
- Uncaught SyntaxError: Unexpected end of JSON input at JSON.parse (
) - WP Rest API – How to get featured image
- Implementing Isomorphic JavaScript (React JS) in WordPress?
- How to use wp_localize_script in custom page template?
- Dynamically insert values in a WordPress SelectControl Options field
- var is undefined in a Gutenberg block
- Exclude JS file from 404 error page
- Base64 & JSON Encode array in PHP, use as HTML data attribute, decode and parse in JavaScript …. with proper Escaping
- AngularJS with route and JSON API
- Pass data from wordpress to javascript in JSON
- How to include a JSON file on my page?
- Why WordPress not using JSON_UNESCAPED_UNICODE by default?
- how to use nimble-API and Display data?
- Remove escape characters from JSON string pulled from a database
- I would like to retrive JSON value and display it in wordpress page or widget
- Connecting a wordpress site to an AngularJS APP
- Gutenberg core/file add style support in js/ json
- Remove element by id
- await is only valid in async function
- Remove duplicate values from JS array [duplicate]
- How to check if array is empty or does not exist?
- javascript set cookie with expire time
- Angular: conditional class with *ngClass
- How can I add a key/value pair to a JavaScript object?
- How to print a number with commas as thousands separators in JavaScript
- How can I check if a string is a valid number?
- events.js: 141 throw er; // Unhandled ‘error’ event
- How to fire an event on class change using jQuery?
- JavaScript code to stop form submission
- How can I stop the browser back button using JavaScript?
- JavaScript isset() equivalent
- $http.get(…).success is not a function
- WordPress 5.5 – ReferenceError: commonL10n is not defined error
- Authentication with the Rest API when using an External Application
- Override do_item() Function to Add Extra Attribute to Scripts
- Uncaught ReferenceError: jQuery is not defined – although jQuery is loaded [closed]
- How can I import one custom block into another?
- Gutenberg Blocks: how to determine an index of the current inner block?
- How to import a JavaScript Library into WordPress
- Uncaught TypeError: Cannot read property ‘add’ of undefined bp-plupload.min.js
- List unused javascript for easy removal
- Include Facebook Javascript SDK In WordPress