Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: infoseeker - elokuu 16, 2011, 12:50:50 AP

Otsikko: my smf 2.0 default curve theme not valid for w3c.
Kirjoitti: infoseeker - elokuu 16, 2011, 12:50:50 AP
Hellow dear smf support team, iam getting 1error when i try to validate my forum with default theme.

The error is looking like below:


Validation Output: 1 Error
Line 34, Column 23: character "&" is the first character of a delimiter but occurred as data
  if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && key...



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 24: character "&" is the first character of a delimiter but occurred as data
  if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && key...



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 34: character "<" is the first character of a delimiter but occurred as data
  if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && key...



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 41: character "&" is the first character of a delimiter but occurred as data
...if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyC...



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 42: character "&" is the first character of a delimiter but occurred as data
...f (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCo...



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 74: character "&" is the first character of a delimiter but occurred as data
...eyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 75: character "&" is the first character of a delimiter but occurred as data
...eyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 85: character "<" is the first character of a delimiter but occurred as data
...eyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 93: character "&" is the first character of a delimiter but occurred as data
...eyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 34, Column 94: character "&" is the first character of a delimiter but occurred as data
...eyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))



This message may appear in several cases:
You tried to include the "<" character in your page: you should escape it as "&lt;"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.
Line 43, Column 5: marked section end not in marked section declaration
// ]]></script>


So i used recommended source input for validation.

I changed line 34 and 44 as the validate instructions.
34.
if (((keyCode >= 65 && keyCode <= 90) && !shiftKey) || ((keyCode >= 97 && keyCode <= 122) && shiftKey))
43.
// ]]></script>


After changing those two lines as w3c recommended my forum validated as w3c html.

But when i browsing my smf forum iam getting error as "templete parse error"
Even iam not using basic html in my forum for posts.

So please help me.
Thanking you.
Otsikko: Re: my smf 2.0 default curve theme not valid for w3c.
Kirjoitti: Ricky. - elokuu 17, 2011, 06:03:44 AP
First of all, it should validate only HTML / output part, it has nothing to do with your PHP. WHen it says problem in line 43 then it is problem in html output but not in your source . So technically line 34 is in your HTML out which you see through CTRL+U when viewing in Firefox or Opera !
Otsikko: Re: my smf 2.0 default curve theme not valid for w3c.
Kirjoitti: infoseeker - elokuu 22, 2011, 08:05:32 AP
Thank you very much brother.
Now my problem solved.