The following content assumes that you have a WordPress installation with the All in One SEO plugin installed

WordPress is a fabulous system for blogging, you can do almost everything: you can post, add media, change themes as much as you want. However, once you start adding plugins, things may get ugly, you will start losing control about how the html code is exposed to the world, you may lose performance or gain some issues with the W3C validation tool. At this point, you may defend yourself by searching at the community for assistance (or at least some pointers), but the problems start once you need to fix something and no third-party company is going to fix it in a short-term, then you have to do it yourself and be ready to get dirty.

There is an issue on all those wordpress installations with the SEO plugin called “All in One SEO”, this plugin offers a feature called “Social Meta“, that makes your page more “shareable” by using some meta tags that facebook and other social networks can read and use, those meta tags allows you to define: a suitable description for your post, the image that it should use when sharing and the author information. Everything seems to be ok here, but the problem lies in the how the plugin set the xmlns for those meta tags…

For AIO SEO, the xmlns should be set as:

Those definitions are set within the <html> tag and according to the W3C standards, those ones aren’t valid xmlns definitions! That’s a facebook proprietary definition, they can parse and use that information but it will invalidate your site at the W3C. So, What’s the big deal here? There is no big deal, those proprietary definitions won’t break your site and you can probably live with it, but when your site is not 100% valid, it will depend on how the browser tolerate its faults, it will render your site as expected now, but who knows tomorrow, so here a solution to quick fix this issue:

Look for the file all-in-one-seo-pack/aioseop_opengraph.php in your plugin directory (or edit it via wordpress) and search for this section:

For versions < 2.2.1

And then, edit the foreach section  as follows:

For versions >= 2.2.1

And then, edit the foreach section  as follows:

Clear any cached resourced on your wordpress site and then revalidate your site against the W3C validator, it should pass the test without problems.

 

UPDATE:

Per Steve Mortiboy, AIO SEO Pack v2.2.2 contains the new definitions that fix the validation problems with the W3C. Thanks to the AIO SEO Pack teams for this effort.

 

Follow me

Carlos Alberto Umanzor Arguedas

Web Developer at carlosumanzor.com
Web Developer, QA Engineer and Gamer Enthusiast, Developer of Linkcrawler and Father of a future computer ninja.
Follow me

 

Pin It on Pinterest

Shares
Share This
Optimization WordPress Plugins & Solutions by W3 EDGE