Zen Cart Logo

Markup Validation

Views: 942

Results 1 to 6 of 6
20 Apr 2012, 6:10 PM
#1
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Markup Validation

It appears that my pages are having problems with markup validation. For instance:

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.phytoextractum.com%2Fplant-material-c-1%2Fmimosa-hostilis-jurema-purple-pink-root-bark-powdered-p-141&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3

I'm wanting to resolve some of these errors but I'm unsure of how or where to even look to. Any advice?

Thanks in advance....

20 Apr 2012, 6:15 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Markup Validation

Core zencart will validate (in general). Problems occur when you start tinkering with code, build define pages and ezpages with bad HTML, install addons that are not well-built, fool about with SEO URL nonsense...)

20 Apr 2012, 6:33 PM
#3
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Markup Validation

well so being that this is a product page, how do I got about fixing this? is it simply a template modification? i don't really have a lot of additional add-ons or customizations. what steps would one take to resolve these problems?

20 Apr 2012, 7:10 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Markup Validation

Many of those errors are "cascade" errors. That is, the first error triggers a second one which triggers a third one, and so on. From what I can see the first error is just an incorrect closing tag in one of the head tags...

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

So find where you put the code for the favicon, fix it with the correct closing for the XHTML doctype, then redo the validation. It should be...

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />

Note the addition of a space and a slash at the end of the bracket. (The space is also needed to fix several other errors.)

Fix the next one at the top of the list, and so on. most of the errors will magically disappear after you fix the first few. (Don't worry about the ampersand ones. Yes, technically they're errors, but they won't have any effect on anything else.)

Rob

20 Apr 2012, 7:44 PM
#5
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Markup Validation

hey, thanks. that's def helpful. and appreciated!

22 Apr 2012, 8:57 AM
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town &amp; London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Markup Validation

rstevenson:

Many of those errors are "cascade" errors. That is, the first error triggers a second one which triggers a third one, and so on. From what I can see the first error is just an incorrect closing tag in one of the head tags...

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">

So find where you put the code for the favicon, fix it with the correct closing for the XHTML doctype, then redo the validation. It should be...

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />

Note the addition of a space and a slash at the end of the bracket. (The space is also needed to fix several other errors.)

Fix the next one at the top of the list, and so on. most of the errors will magically disappear after you fix the first few. (Don't worry about the ampersand ones. Yes, technically they're errors, but they won't have any effect on anything else.)

Rob

CORE zencart deals with the FAVICON automatically and properly:

<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>

... so if you are getting errors here, then your custom template has HARD-CODED this into the HTML header. The fact that this has been "manually adjusted" at some point, would make me suspicious about other possible "hard coding" has occurred.

I would be concerned about things like this. There is NO NEED to manually adjust the FAVICON coding, and the fact that it HAS been adjusted, indicates that the person adjusting it has a poor understanding of some of the fundamentals of ZC. Other tinkering may have gone on...