View Single Post
  #9  
Old 11-21-2011, 10:17 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: 4.4.4 Site Won't Validate

Quote:
Originally Posted by JWait
Using http://validator.w3.org to validate our site and get the following error...

Line 3234, Column 127: document type does not allow element "link" here

http://www.<MYDOMAIN.com/var/cache/_563a0f615810726ac1aabd5fd6575619.css" />


The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error)
---------------------------------------

Line 3234 come just before the closing /body tag.
Line 3233 is "<script type="text/javascript" src="http://www.MYDOMAIN.com/var/cache/_095eb7bcf85d388ba7d7dc34fd64401a.js"></script>"

My question is where are these links normally called? They appear to be part of the "speed-up tool for Javascript" and "speed-up tool for CSS".

Look in home.tpl - just before </body>. It calles load_defer_code and loads the css and js cached files. Same code is also loaded from service_head.tpl. I would assume the one in home.tpl is there just in case anything is loaded inline in other templates (for different modules) and not in <head>. Technically this code should not be there yes and moving it to head section will validate the page even with speedup tools enabled.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote