• Announcements

    • KC

      Get Smart on the Web   09/16/2016

      Be informed on better ways to stay safe on the web -- Source: Mozilla
Sign in to follow this  
Followers 0
KC

w3 validation error

This topic has had no activity within the past six months. It is recommended that you start a new topic instead of replying to old topics.

12 posts in this topic

http://validator.w3.org/check?uri=http%3a%2f%2fwww.cousincouples.com%2f

Anyone know how to fix this? I have a link on the main page to W3 and now I look like a darn fool with a validation error. I think it is a validation bug on their part.

I literally do this stuff for a living but I don't have time to maintain my own website at the moment. Any help would be appreciated. I used really fussy xhtml trans. I think html 5 has the same error though.

0

Share this post


Link to post
Share on other sites

Why is the first " shown in red on the error msg?  Does it mean that's what is missing?

My skills in this area are far inferior to yours, it just looks like it may need to be defined somewhere else ... just guessing here.

Also on the faq link it mentions that some software can strip out the required data on referer links

0

Share this post


Link to post
Share on other sites

http://davidwalsh.name/facebook-meta-tags

These are new tags that you need for google and FB. They will add an image and description to the search results or FB link.

There should be a way around the validation error. I will research it when I get some time unless someone beats me to it.

0

Share this post


Link to post
Share on other sites

You're missing a space at the end of the line before the closing thingy  ....  between the closing " & />

It's on the line quoted in the error msg, line 8 re: title, also line 9 re: img, line 13 re: site_name, line 14 re: description.

I've never used meta tags but I have had this omission of a space make my code go wonky so worth a try mebbe?

Made more sense once I found the 'show source' option lol.

Else I can look at it some more on Monday when mini me is back at school, something useful to do would be good.

0

Share this post


Link to post
Share on other sites

I tried that and it didn't work either. The original code is here:

<meta property="og:title" content="<?php echo $kt ?> "/>

<meta property="og:image" content="http://cousincouples.com/newccweb.jpg" />

<meta property="og:image:type" content="image/jpeg" />

<meta property="og:image:width" content="415" />

<meta property="og:image:height" content="200" />

<meta property="og:site_name" content="CousinCouples.com" />

<meta property="og:description" content="<?php echo $kd ?>" />

I've read that there is no solution to this problem but I'm not convinced... yet :) Maybe the best solution is to remove the link from the "valid xhtml" logo on the main page lol

0

Share this post


Link to post
Share on other sites

Also, if someone wants to create a better logo, knock yourself out. I should be at least 200x200 (px). All of the logo images we have are way smaller.

0

Share this post


Link to post
Share on other sites

Hmm... that is not identical to the code retrievable from the error message, as shown below

<meta property="og:title" content="Cousin Marriage Resources "/>

<meta property="og:image" content="http://cousincouples.com/newccweb.jpg" />

<meta property="og:image:type" content="image/jpeg" />

<meta property="og:image:width" content="415" />

<meta property="og:image:height" content="200" />

<meta property="og:site_name" content="CousinCouples.com" />

<meta property="og:description" content="Support, resources and information for and about kissing cousins -- including cousin marriage" />

I have zero idea what <?php echo $kt ?>  in your code does, either the validator has translated that to the content above, or it is reading from the wrong place.

Is this likely to be a incompatible-version-of-html type issue?  If so, can we switch that?

There is always a solution lol.  Plus that was posted 2 yrs ago and it gives a different error msg to the one we are have encountered.

What was this supposed to be doing anyway?  Is it a referral link to W3 site? or does it do something else?

PS Can u tell I'd like a challenge just now?  I have finally made a start on Operation Kitchen though, should keep me out of trouble for a while heh ...

0

Share this post


Link to post
Share on other sites

the php is a programming lang. <?php echo $kt ?> prints out the title. The validate doesn't see this. Press control  U in your browser and you see what they see.

I bet if I change my doc type (say html 5), I will get 50 other errors lol. I don't think there is a solution until they change the syntax of the tags.

It is just a hateful thing. These tags tell google & facebook where to find a logo of my website to use and a description to use with it.

Have you ever hit a share button and then see the info come up in FB? Share a CNN story and you can see what I'm talking about.

0

Share this post


Link to post
Share on other sites

I found sthg by looking at a website someplace and it seems to define things as meta name before using them;

<meta name="title" content="blah blah" />

<meta itemprop="name" content="blah blah" />

<meta property="og:title" content="blah blah" />

<meta name="description" content="blah blah" />

<meta itemprop="description" content="blah blah" />

<meta id="meta-tag-description" property="og:description" content="blah blah" />

<meta itemprop="image" content="imageref" />

<meta property="og:image" content="imageref? />

The tips on w3 site also says, " Metadata is always passed as name/value pairs. "

I can only find 3 meta name definitions in your code, for generator, keywords and description. 

Perhaps you can try adding one for title eg :-

<meta name="title" content="Cousin Marriage Resources " />

and see if it still kicks out at the same line of code or goes further?

0

Share this post


Link to post
Share on other sites

Thank you Lori. That isn't going to work either. But you got me thinking! All I had to do was change the DOCTYPE.

It reported two other errors that I was able to solve easily. So -- problem solved!

The funny thing is that I just spent a week fixing validation errors for another website, so I know the "power" of changing doctypes. The first thing I did was change the other site from xhtml to html 5. That cleared about 1/2 of the validation errors off the bat.

It's a funny thing that I couldn't find a solution to this problem. I think the doctype I used is new. It's hard to stay up to date on the changing markup language. It gets more complicated by the day.

Thanks for your time in researching this with me!

0

Share this post


Link to post
Share on other sites

Yay!  Way to go Boss :)

Sometimes it can help to get a fresh pair of eyes to look over something and then you spot the solution yourself anyway, used to happen to me all the time in my old job :)

0

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Sign in to follow this  
Followers 0