Zen Cart Logo
Forums / General Questions / Validator Issues... I'm stumped

Validator Issues... I'm stumped

Views: 858

Results 1 to 12 of 12
4 Feb 2016, 6:14 PM
#1
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Validator Issues... I'm stumped

Hello!

Here is my site:
http://smtsupplies(DOT)com/

So I've been trying to resolve Validator problems (using validator.w3.org) and I have been very successful... up until now!

I have 2 remaining errors that I can't figure out.

FIRST
I get this message: there is no attribute "property"
Related to this: <meta property="og:title" content="" />

I really don't know what to do about that!

SECOND
And this message: required attribute "type" not specified
Related to this: <script>

I can't figure out what this is in reference to, thus I don't even know where to start looking! :(

Any thoughts?

4 Feb 2016, 6:38 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Validator Issues... I'm stumped

SECOND:

In your page HTML, you have the following. Before HTML5 the "validator" wants you to declare what "type" a "script" is, by noting it as I've highlighted:

<div id="headerWrapper">

<script[B] type="text/javascript"[/B]>
$(document).ready(function() { 
...
4 Feb 2016, 6:43 PM
#3
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

Ok, thanks.

But any thoughts on which php file contains that reference?

4 Feb 2016, 6:47 PM
#4
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

<meta property="og:title" content="" /> it's html5

By the way, there is a module for og, twitter and semantics, etc...meta tags....but I can't recall the name.

4 Feb 2016, 6:48 PM
#5
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

Found it! Yay! Thank you, thank you, thank you!

One down, one to go!

4 Feb 2016, 6:51 PM
#6
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

Feznizzle:

Ok, thanks.

But any thoughts on which php file contains that reference?

Search your files for "<div id="headerWrapper">"

In html5 doctype, no need to use <script type="text/javascript">, just <script>

4 Feb 2016, 6:59 PM
#7
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

And your <html> should have something like this to use opengraph stuff :

<html xmlns="https://www.w3.org/1999/xhtml" xmlns:og="https://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">

But, like I mentioned, there's a module that's does all this for you

4 Feb 2016, 11:39 PM
#8
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

Thank you, mesnitu!

I will look for that mod and let you know if it solves to problem.

5 Feb 2016, 10:48 AM
#9
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

It's call Super Data Markup
It also introduces semantics markup to products for google, facebook, etc...

https://www.zen-cart.com/downloads.php?do=file&id=1984

But not sure if it validates, because it's the template it's xhtml. However possibly there's a way. I also have a site that doesn't validate that property , but I never payed much attention to that.
Or maybe you could check if altering the doctype to html5, if you need to make a lot of changes to what you have now.

5 Feb 2016, 12:16 PM
#10
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

Awesome, mesnitu! And DrB! Thank you guys so much!

Hey... can I point y'all at another validation issue I'm having? Maybe you might just know the answer?

I started a thread for it here:
https://www.zen-cart.com/showthread.php?219471-Ampersands-Not-Being-Converted

Thanks again!

5 Feb 2016, 7:13 PM
#11
lloyd_borrett avatar

lloyd_borrett

Zen Follower

Join Date:
Mar 2006
Location:
Rosebud, Victoria, Australia
Posts:
308
Plugin Contributions:
2

Re: Validator Issues... I'm stumped

Unfortunately Zen Cart is a can of worms when it comes to handling HTML entities. There are just so many places in the code and plugins where it's overlooked. Plus if you start to sort them out, it has an impact with onsite search. Having a consistent policy and enforcing it seems to have been put in the too hard for too little gain basket for many years.

So so you need your own site policy. I do my best to use 'and' not '&' wherever possible. Then I just wear the validation issues caused when & has to be used in brand names and product codes.

5 Feb 2016, 7:23 PM
#12
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Validator Issues... I'm stumped

lloyd_borrett:

Unfortunately Zen Cart is a can of worms when it comes to handling HTML entities. There are just so many places in the code and plugins where it's overlooked. Plus if you start to sort them out, it has an impact with onsite search. Having a consistent policy and enforcing it seems to have been put in the too hard for too little gain basket for many years.

So so you need your own site policy. I do my best to use 'and' not '&' wherever possible. Then I just wear the validation issues caused when & has to be used in brand names and product codes.

Yeah, that's kind of where I'm at. I inserted html for categories, but I'm going to leave product names, etc, alone. Just let the chips fall as they may.