Can't figure out error shown in validator
I’m trying to understand how to solve this error:
Line 44, Column 16: there is no attribute “property”
<meta property=”og:site_name” content=”Tribe of Admins”/>
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the “Strict” document type with a document that uses frames (e.g. you must use the “Transitional” document type to get the “target” attribute), or by using vendor proprietary extensions such as “marginheight” (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
which comes from putting my site through this link:
1) although I can find it in the source, I can’t find it anywhere in the theme or the stylesheet. Where the heck is it?
2) once I find it, I don’t have a clue what to do about it.
Facebook uses opengraph protocol so you must use XHTML+RDFa doctype!
There is however one problem, you must code everything XHTML strict.
Here is the doctype you should use…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
Edit: Its the Facebook like plugin!!
Thanks, Reuben…but I’m not actually doing any coding – I’m just trying to figure out what’s kicking my sidebar out of place on the single posts. I don’t understand much about coding, so it’s like digging through mud. I can fix little things, but…
If it’s just the facebook widget that’s miscoded, I don’t care. I’ll go try to figure out where I put it and see if I can fix it, though!
No it wont fix any display issues. Its just for the W3 Validator.
Here’s the thing. Disable all plugins, then run the validator. Just your content and theme. If you then have errors, those should be corrected. Once your theme is good, turn your plugins back on. You can’t get things straight for all plugins, but they ‘usually’ won’t affect your layout if you’ve got your theme all good.
Adding a link here to the website, or the validation link would help as we can then view the source.
If it is ther single.php and a single post, when the theme is shifting, then it is 99.9% of the time a missing closing tag in the post or page html, and the validator thinks that the line of code is a nested part of another block!
Actually, I ran the validator when I first set it up – no plugins – and couldn’t find the errors in the theme because they’re listed my line and column number, usually with very little text to give you a clue as to where they are.
Thanks, adeptris. I’ve posted the shifting problem with a link to a post a couple of times and the only response I got was to put it through the validator, so I’m sure you’re right. It’s the single post that’s kicking the sidebar. I really thought I’d just accidentally altered the single post width, but I can’t find that.
it looks like your page div is never closed. You are missing one </div> in single.php (most likely..is this a page, or a single post view?) which may very well throw your sidebar off
Also, some of the other issues you have there for your DOCTYPE.
<break></break>is invalid…. are you looking for a line break?
and images must be self closed
<img src="blah blah" />need the final slash
I’ll look for it. I saw that…and it also says that there’s a body tag not closed. I can’t find a body tag that isn’t closed…v. frustrating! I’ll go through it when I get back this afternoon. Knowing the problem is probably an open tag is at least a good start!
I believe the body tag error cascades. It is closed, you are fine. It’s the missing closing div which throws other errors onto it. Its telling you that you closed out the body tag with elements still open. That is why it trigger an error
ignore the first lot and look for tag problems.
<a href="http://www.linkedin.com/company/tribe-of-admins?trk=fc_badge"><img src="http://static01.linkedin.com/scds/common/u/img/webpromo/btn_cofollow_badge.png" locale="en" alt="Tribe of Admins on LinkedIn"></a>
Image is missing the closing tag
="Tribe of Admins on LinkedIn"/></a>or
="Tribe of Admins on LinkedIn"></img></a>
<break></break> <break></break> <!--This is the creative commons copyright code-->
Fix these then revalidate!
When using the validator check the ‘Show Source’ tick box and revalidate.
Then the errors will have hyperlinks to the line.
Edit: another reply the same, while I was writing mine, really says it all!
- The topic ‘Can't figure out error shown in validator’ is closed to new replies.