Just to add some extra detail, here’s how the link tag for the api is appearing in my site:
<link rel='https://api.w.org/' href='http://www.commonwealthroundtable.co.uk/wp-json/' />
Thanks
I’ve had the same problem since updating to 4.4 and it looks like it’s appearing for a bunch of other sites (according to a quick Google of the error).
Looks like something is either missing or needs to be deleted, but I’m not confident enough to do it myself 🙂
Thanks for the comments Paul.
I also had a quick Google around the issue and found a few hacks, but no posts directly addressing that the issue was causing validation issues. :/
Would be nice if the WP development team could suggest a way to make this valid, or launch a bug fix release.
I have the same problem too. I hope it will resolve soon.
I also ran into this issue. I found another post about this here: https://ww.wp.xz.cn/support/topic/relhttpsapiworg-json-noise-doesnt-validate?replies=16. It doesn’t look like a fix will be happening soon, but at least it’s good to know why it has appeared and why it’s breaking our W3C validation efforts.
Hi,
I have also spotted this issue. I have been testing my site for load speed on Pingdom.
It appears that one of the reasons for the site loading being slowed down is because it is looking for the “http://www.mydomain.com/wp-json/>; rel=“https://api.w.org/“ resource and because it can’t find it it is returning a 404 error, which is being shown as “/none” in Pingdom. The trouble is it’s taking 10 seconds or more to decide it can’t find the resource.
Nevertheless, I did some searching and found that if you add the following function to the function.php file it would stop your page looking for the resource:
function remove_api () {
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );
remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );
remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );
}
add_action( ‘after_setup_theme’, 'remove_api' );
So I added the code and it does indeed remove it from the header, and I alos found that Pingdom no longer shows the link itself in the “/none” element, but it is still returning a 404 error, which subsequently is still slowing down the speed of the page loading.
To illustrate this I’ve created a graphic – I can’t see a way to share images here so I’ve posted an image on my website to illustrate what I’m seeing in the Pingdom speed tester.
Here’s the link to the post:
http://aquamandesign.co.uk/API-wordpress-problem.html
My problem is I’m not a coder, so if anybody could enlighten us on how to fix this issue that would be really, really great.
Thanks
D