How can we change code so site is validated by w3.org?

General ShopSite user discussion

How can we change code so site is validated by w3.org?

Postby Oldedit » Fri Oct 27, 2006 2:50 pm

Our site is built in shopsite. When we go to w3.org and try to have our site validated we are told it doesn't work. This is important so that we can be indexed by all the search engines.

This is what we get From:
http://www.w3.org/QA/Tips/Doctype


There is not just one type of HTML, there are actually many: HTML 4.01 Strict, HTML 4.01 Transitional, XHTML 1.0 Strict, and many more. All these types of HTML are defined in their respective W3C specifications, but they are also defined in a machine-readable language specifying the legal structure, elements and attributes of a type of HTML.

Such a definition is called a "Document Type Definition", or, for short, DTD.

Tools which process HTML documents, such as Web browsers, need to know which DTD an (X)HTML document is actually using: this is why each (X)HTML document needs, at the beginning, a DTD declaration, such as:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


This appears to be the offending code. Can we change this without messing up the site? How?

Code in our Include Template:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


How do we validate our e-commerce site with the correct DOC TYPE so that we can validate the site and make it searchable by Technorati?

P.S. www.shopsite.com is not validated, either.

tia
Total web site is in Shopsite. Also blog in Expression Engine and Run a vBulletin board. Looking for ways to sell more stuff.
Oldedit
 
Posts: 13
Joined: Wed Sep 13, 2006 5:30 pm
Location: Centennial, CO

Postby Jeff » Fri Oct 27, 2006 10:23 pm

"W3C specifications" Don't hear much about validation these days.

Many top commerce sites don't carry a doctype specification, or most other tags for that matter.

We "validate" pages by looking at them in recent versions of IE and FF.

BTW, downloaded IE 7 a few days ago and SS generated-pages look fine in it, at least at first glance.
Jeff
 
Posts: 97
Joined: Wed Aug 16, 2006 9:40 am
Location: St. Louis MO

Postby stilfx » Tue Jan 09, 2007 10:26 am

Jeff wrote:Many top commerce sites don't carry a doctype specification, or most other tags for that matter.

We "validate" pages by looking at them in recent versions of IE and FF.



That is absolutely no excuse!

This page is not Valid HTML 4.01 Transitional!
http://validator.w3.org/

If a page doesn't validate — it is wrong, plain and simple. Even worse, poor coding = bad usability and improper rendering in some browsers. Which at the end of the day means a poor User experience for some customers and directly relates to missed sales!

Even worse is the (default shopsite templates) use of style sheets.

I find the code behind this cart to be downright shameful and I think it needs to be addressed immediately (especially at this license price-point). There is only so much you can correct through a custom template — which by the way makes my job as a designer / dev exponentially harder.

To be completely honest, the included templates don't seem to have been updated since circa 1998. :evil:

- - -

@ Oldedit: I suggest you hire a designer competent in Web Standards. You will find the DocType is only the beginning of the validation issues.
stilfx
 
Posts: 42
Joined: Wed Dec 13, 2006 7:56 pm

Postby Jim » Tue Jan 09, 2007 10:27 pm

Perfection is a nice goal but rarely achieved. Even the highest quality diamond will have flaws if looked at with a powerful enough lens. And how many perfect 10 beauty queens or models are there out there? Note that even the latest versions of IE and Firefox which make up 95+ % of browers used are not standards compliant

Some of the non- "HTML valid" code on the shopsite.com site that you referenced is caused by the _validator_ checking "write" statements in a javascript routine. It shouldn't be doing that and the html in the write statements is correct when you look at it completely and not a line at a time.

We try to fix specific issues as they are brought to our attention. If you have specific issues that are causing display problems or interfer with the shoppers experience let us know and we will try to get them fixed. As new templates are added to the product we try to make them standards compliant. Older templates are fixed if a problem is noted but we can't just make arbitrary changes to old template because people may have done tweaks on them in their store and a change to the template could break their store when it is upgraded.

Again if you have specific issues let us know. The best method of doing this would be by escalating it through a ShopSite hosting partner or you can enter it here in the Enhancement Forum
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby stilfx » Wed Jan 10, 2007 8:09 am

Valid response. I'm just finding the code in the default templates hard to swallow.

I didn't even get into the JS yet. Turning me off is simple things like writing tag attributes correctly, src=image.gif instead of src="image.gif", etc.
stilfx
 
Posts: 42
Joined: Wed Dec 13, 2006 7:56 pm

Postby ivantohelpyou » Thu Feb 15, 2007 12:54 am

Hi,

Having the "!DOCTYPE" set is not an optional "nice to have." It is a must.

Earlier this week at a PHP conference in Vancouver I learned about a cross-site scripting (XSS) security vulnerability with web pages that do not set Doctype correctly.

Here's an explanation of the XSS vulnerability.
http://blog.php-security.org/archives/3 ... ugged.html
http://www.hardened-php.net/advisory_122006.137.html

Summary: If a Web page does not contain a !DOCTYPE declaration, an attacker can trick some browsers into thinking that the page is encoded using UTF-7. That's apparently enough of a hole to inject code into a form, with potentially unpleasant results.

I can't say I completely understand the vulnerability, but I received crystal clear advice on how to mitigate it -- make sure that every page has a DOCTYPE declaration.

My question:

What's the easiest, fastest, simplest way to make this fix quickly, on a default ShopSite installation? I am not interested in recreating the entire site using templates.

Thanks....
ivantohelpyou
 
Posts: 1
Joined: Wed Dec 06, 2006 7:35 pm

please answer

Postby minifig » Mon Jun 25, 2007 9:43 am

ivantohelpyou wrote:My question:

What's the easiest, fastest, simplest way to make this fix quickly, on a default ShopSite installation? I am not interested in recreating the entire site using templates.

Thanks....


I also would like an answer to this question.

-Suz
minifig
 
Posts: 6
Joined: Mon Jun 25, 2007 9:37 am

Postby Jim » Mon Jun 25, 2007 1:58 pm

Here are the DOCTYPES for ShopSite provided templates in version 8.3. Note that all of these use the custom template language for the page templates. You can make copies of these templates and make changes to them if needed If you have made your own templates you can also add the DOCTYPE to your tempate.

CrossSell-Sky-page:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Rounded:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Sidebar:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
awesome_blue_001_pa_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
awesome_orange_001_pa_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
classy_pa_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
elite_001_pa_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
gradient1-page.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
sg_page_template:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
tab_page_template:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
stainglass:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


and for moreinfo pages which come from product templates
CrossSell-Sky-product:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
DefaultCustomProductTemplate:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
awesome_blue_001_pr_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
awesome_orange_001_pr_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
classy_pr_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
elite_001_pr_template.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
gradient1-product.sst:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"



The following templates are older 'C' coded templates and there is no way that you can add a DOCTYPE to these templates

Mondrian, Lefty, Matte, Top Notch, Plain.

So the "easiest, fastest, simplest way to make this fix quickly. would be to use one of the templates listed in the top group.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby beley » Tue Jun 26, 2007 1:52 am

First, I have always been one who has pushed ShopSite to generate valid HTML code. I run every single website I create through the validator to check for syntax errors.

If you are using custom templates, you can most certainly get 99% of your website to validate as perfect HTML. The biggest problem I had was with ampersands, and ShopSite guys (Can't remember if it was Jim or Loren) gave me several ways to have SS generate the correct link URL's.

If you are proficient in HTML, you should have no problems writing a custom template that validates.

...

Now, I have to voice my opinion on your crusade for validation. Yes, it's important for many reasons. However, an error here and there is not the end of the world. Certain things (doctype) should always be done, but some well formedness errors don't really cause any problems and never will. They don't cause search engines to not see your site. They don't cause web browsers not to render your site. They don't cause users problems placing an order.

So, would it be great if everyone wrote valid code? Sure! But with the hodgepodge of code snippets from JavaScript, PHP, ShopSite, all coming from different sources demanding perfect code is like demanding a world without crime.

Would it be nice? Sure! Is it going to happen? Absolutely not.

So, If you have specific problems with the way ShopSite generates a tag (I do with several), let them know. They may not fix it immediately, but they will likely fix it in a future release.
Brandon Eley
Certified ShopSite Designer
beley
 
Posts: 111
Joined: Sun Aug 06, 2006 10:05 am
Location: LaGrange, GA

Postby minifig » Tue Jun 26, 2007 10:01 am

beley wrote:[...] If you are proficient in HTML, you should have no problems writing a custom template that validates.

This is good news.

Thanks also for the quick response from ShopSite folks!

-Suzanne
minifig
 
Posts: 6
Joined: Mon Jun 25, 2007 9:37 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 59 guests