WepYep and W3C validation

General discussions about WebYep
Post Reply
DesignNorth
Rank 2
Rank 2
Posts: 57
Joined: Mon Apr 23, 2007 4:49 pm

WepYep and W3C validation

Post by DesignNorth » Fri Sep 12, 2008 2:56 pm

Should a page with WepYep elements validate using the service at http://validator.w3.org/?

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Post by johannes » Mon Sep 15, 2008 12:38 pm

Did you get any validation errors - if so which?

DesignNorth
Rank 2
Rank 2
Posts: 57
Joined: Mon Apr 23, 2007 4:49 pm

Post by DesignNorth » Mon Sep 15, 2008 7:42 pm

for example in a HTML 4.01 Transitional document the web yep editable content is bringing up an error when line returns are added.

Code: Select all

<a href="http://www.ukbarfclub.co.uk/about-barf-feeding/what-is-a-barf-diet.php">UK BARF Club - For All Things Natural</a>
<br>


And the Error @ w3

ine 156, Column 145: NET-enabling start-tag requires SHORTTAG YES.
…Club - For All Things Natural</a><br />

The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

DesignNorth
Rank 2
Rank 2
Posts: 57
Joined: Mon Apr 23, 2007 4:49 pm

Post by DesignNorth » Tue Sep 16, 2008 9:11 pm

What doctype should you set a WepYep page to?

GSWebDesign
Posts: 4
Joined: Fri Aug 21, 2009 2:45 pm

Re: WepYep and W3C validation

Post by GSWebDesign » Fri Aug 21, 2009 2:56 pm

I am using the latest version of WebYep (downloaded 19 August) and I am getting validation errors when I add a webyep_image element:

e.g. (when I try and validate this page: http://www.carolinefallontherapies.co.uk/index.php, I get:)

"Line 77, Column 111: end tag for "img" omitted, but OMITTAG NO was specified

…age-5696.jpg' alt='Caroline Fallon'> <h2>Welcome!</h2><p class="centerhiligh



You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">"


i.e. WebYep is not self-closing the image tag correctly. It should be /> and it's only providing this: >

This then causes several other errors to occur on the page.

Seems rather an elementary mistake for the latest version of WebYep to be causing.

The Doctype I'm using is XHTML 1.0 Transitional (fairly standard these days, is it not?)

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Re: WepYep and W3C validation

Post by johannes » Thu Aug 27, 2009 5:48 pm

In the current version of WebYep (1.4.2) there is a new (currently unofficial) configuration directive:

Code: Select all

$webyep_sHTMLStandard
If you are using a document type of HTML 4.01, you should set this to:

Code: Select all

$webyep_sHTMLStandard = "HTML";
And if you're using XHTML, you should set this to:

Code: Select all

$webyep_sHTMLStandard = "XHTML";


This config setting is not mentioned in the docs as it is not fully implemented now - any feedback of tags still reported by the validation checks are much appreciated.

GSWebDesign
Posts: 4
Joined: Fri Aug 21, 2009 2:45 pm

Re: WepYep and W3C validation

Post by GSWebDesign » Fri Aug 28, 2009 12:01 pm

Thanks, Johannes, for that. It now validates - even though I'm using XHTML Transitional rather than Strict.

I think this is something important that you should add to the documentation.

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Re: WepYep and W3C validation

Post by johannes » Mon Aug 31, 2009 12:14 pm

Thanks for the feedback - good to hear it works fine for you.

We are currently tweaking it a bit and gathering more feedback. We expect this feature to become "official" in one of the next releases - then it of course will also be explained in the documentation.

testing1
Rank 1
Rank 1
Posts: 23
Joined: Tue Oct 13, 2009 5:25 pm

Re: WepYep and W3C validation

Post by testing1 » Tue Oct 13, 2009 5:33 pm

Hi Johannes,

I have the same exact problem as the person on this post, even though I have updated to the latest WebYep. Could you please review this site http://pocketcreative.com/test/contact.php and let me know what is wrong?

-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-$webyep_sHTMLStandard = "XHTML";
-used http://validator.w3.org/
-updated to WebYep 1.4.4
-Error message reads:
Line 5, Column 34: end tag for "meta" omitted, but OMITTAG NO was specified
<meta name="keywords" content=…
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Re: WepYep and W3C validation

Post by johannes » Wed Oct 14, 2009 7:13 pm

The two tags that the validator complains about:

Code: Select all

<meta name="keywords" content="">
<meta name="description" content="">
do not have correct XHTML syntax - they are also not created by WebYep.

Solution: Correct the Syntax to read:

Code: Select all

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

testing1
Rank 1
Rank 1
Posts: 23
Joined: Tue Oct 13, 2009 5:25 pm

Re: WepYep and W3C validation

Post by testing1 » Wed Oct 14, 2009 8:56 pm

Hi Johannes,

Thank you for your help, it works now.

But, I have to reference this post http://forums.obdev.at/viewtopic.php?f=6&t=1413&p=5200&hilit=+keywords#p5200, which is where I got the wrong code in the first place. It turns out that the "/" is missing from "/>".

See error in the code here, found in the "Editing the keywords metatag with WebYep" post.

Code: Select all

<meta name="keywords" content="<?php if (!webyep_bIsEditMode()) webyep_longText("global-keywords", true, "", false); ?>">


Again, thank you for your help and I appreciate your product very much.

johannes
Objective Development
Objective Development
Posts: 815
Joined: Fri Nov 10, 2006 4:39 pm
Contact:

Re: WepYep and W3C validation

Post by johannes » Fri Oct 23, 2009 11:56 am

Thanks for pointing this out.

Well, that code is not wrong, it's just not XHTML. It is valid strict HTML 4.01 though.
If you want to code in XHTML, you of course need the extra "/" before the ">".

Post Reply