Post by hm2k » Tue May 27, 2008 12:01 am

The current version here doesn't validated:

http://validator.w3.org/check?verbose=1 ... art.com%2F

Suggestions on how to fix:
Don't use XHTML style tags, with a non-xhtml doctype.
Use PHP's htmlspecialchars() to encode hrefs, turning & into &.

The development version here doesn't validated:

http://validator.w3.org/check?verbose=1 ... art.com%2F

Suggestion on how to fix:
Use the HTML encoded symbol, instead of the actual symbol (ie: use £ instead of £).

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by JNeuhoff » Wed Jun 04, 2008 5:01 pm

A common problem with many websites.

If the final OpenCart 0.8 continues to have validation problems I am willing to port my XHTML upgrade package to the upcoming 0.8 version, but I'd prefer having a clean XHTML flavor of OpenCart 0.8 in the first place.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by hm2k » Wed Jun 04, 2008 7:48 pm

Last edited by hm2k on Wed Jun 04, 2008 8:27 pm, edited 1 time in total.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by david.gilbert » Thu Jun 05, 2008 3:25 pm

I disagree hm2k with them two articles

I build all of my sites to be compatible with XHTML and opencart believe it or not can be built to validadte. There is an XHTML patch made by JNeuhoff in the contributions area here http://forum.opencart.com/index.php/topic,720.0.html

IE while it has it's problems handling XHTML, can be manipulated through extra CSS styles to fix any errors with output.

I tend to agree with you about making it XHTML compliant out of the box, CSS3 would be great too.

there is a what seems to be dead project, freecsscart. It promises to be fully XHTML and CSS compliant. I got sick of waiting for it's initial release and found opencart.

-Dave

Professional Website Services - http://www.davidmgilbert.com/


Active Member

Posts

Joined
Sun Jan 06, 2008 5:02 pm
Location - Mount Compass, South Australia

Post by bruce » Thu Jun 05, 2008 3:30 pm

I also use the XHTML patch for OpenCart by JNeuhoff. It adds the final touch of professionalism to your web store and I would not be without it.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by hm2k » Thu Jun 05, 2008 5:41 pm

david.gilbert wrote: I disagree hm2k with them two articles

I build all of my sites to be compatible with XHTML and opencart believe it or not can be built to validadte. There is an XHTML patch made by JNeuhoff in the contributions area here http://forum.opencart.com/index.php/topic,720.0.html

IE while it has it's problems handling XHTML, can be manipulated through extra CSS styles to fix any errors with output.

I tend to agree with you about making it XHTML compliant out of the box, CSS3 would be great too.

there is a what seems to be dead project, freecsscart. It promises to be fully XHTML and CSS compliant. I got sick of waiting for it's initial release and found opencart.

-Dave
You shouldn't disagree with the articles, they are based on real world facts.

I personally can't understand the need to use and define XHTML instead of HTML 4.01.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Luvz2drv » Thu Jun 05, 2008 8:59 pm

yes i can see you MAY not understand... but it is not about US (the dev's or web design ppl wanting) its about the BUZZ words OUR clients here and want to see...

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by hm2k » Fri Jun 06, 2008 12:06 am

Luvz2drv wrote: yes i can see you MAY not understand... but it is not about US (the dev's or web design ppl wanting) its about the BUZZ words OUR clients here and want to see...
*s/here/hear

Clients don't understand buzz words, but when their site doesn't work properly on their choice of web browser, they understand that.

You'll find they are more impressed if you tell them you know all about [buzz word] and can offer them the correct advice.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by hm2k » Thu Jun 26, 2008 8:57 am

To fix all the BAD XHTML that should be GOOD HTML we need to replace all references of " />" in all .tpl files with simply ">", then it will fully validate.

Since there's a lot of files, this isn't actually that easy to do, so using some neat scripting magic here's what I did...

First off, I found all the tpl files...

[hm2k@blade upload]$ find ./ -name '*.tpl'

Then I made a copy of the list and manually replaced "./" with "sed -i 's/ \/>/>/g' ./" using a text editor.

Then I did the following:

[hm2k@blade upload]$ nano -w noxhtml.sh
-> PASTE THE CODE, SAVE, AND EXIT
[hm2k@blade upload]$ chmod 755 noxhtml.sh
[hm2k@blade upload]$ ./noxhtml.sh

Note: This assumes you have shell access to your web hosting, you could also write a script in PHP to do the same job, providing you set all your .tpl files to chmod 666 (writeable).

Hope this helps!
Last edited by hm2k on Thu Jun 26, 2008 9:00 am, edited 1 time in total.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by hm2k » Thu Jun 26, 2008 9:19 am

It's worth noting that at the moment fckeditor will only produce xhtml, you should upgrade your fckeditor to the latest version.

A fix for this was only added into fckeditor this year -> http://dev.fckeditor.net/ticket/2163

Also see: http://forum.opencart.com/index.php?topic=998.0 for when you're configuring it.
Last edited by hm2k on Thu Jun 26, 2008 9:20 am, edited 1 time in total.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 3 guests