Maybe I'm code-blind after too long at the screen, but can anyone see any reason why this line of HTML in my head tag would cause my entire page to break in standards-compliant browsers?
Can you see any JavaScript errors when the script is included? Which browser are you using? Chrome or Firefox should show you the errors in the console.
What I mean is that Chrome/Firefox seem to encounter an error at this line and close the <head> tag prematurely, leaving the remainder of my <head> contents rendered as whitespace at the top of the <body> element. Here's the W3C validator output:
Validation Output: 8 Errors
Line 23, Column 87: Element head is missing a required instance of child element title.
Hey Tom, Just to be clear this is the W3C validator and not the browsers reporting this problem?
The only thing I can think off, is that it may not like the filename of the JavaScript file, so I recommend you rename the file to chromeless_player.js
Let me know how that goes, as the W3C validator might have a strict rule about filenames or getting confused what the file extension might be.
Something very weird is happening
Maybe I'm code-blind after too long at the screen, but can anyone see any reason why this line of HTML in my head tag would cause my entire page to break in standards-compliant browsers?
This line breaks the head element completely. I've just installed uTube on a fully functional Umbraco 4.7 site.
If I comment it out thus, everything works (except uTube!):
Hey Tom,
What do you mean by everything breaks, as I can't see any specifically wrong with that script tag.
Can you provide more details, so we can see what the problem is.
Cheers,
Warren :)
Hi Tom,
The HTML is correct, that's not the issue.
Can you see any JavaScript errors when the script is included? Which browser are you using? Chrome or Firefox should show you the errors in the console.
Cheers, Lee.
Hi,
Thanks for writing so quickly.
What I mean is that Chrome/Firefox seem to encounter an error at this line and close the <head> tag prematurely, leaving the remainder of my <head> contents rendered as whitespace at the top of the <body> element. Here's the W3C validator output:
Validation Output: 8 Errors
head
:iframe
srcdoc
document or if title information is available from a higher-level protocol: Zero or more elements of metadata content.title
element.title
may be used:head
element containing no othertitle
elements.body
:It goes on to complain about subsequent head elements being in the wrong place, which they are not.
Chrome reports no JS errors in the console, nor does Firefox.
Like I said - weird!!!
Sounds like you are missing a <head> tag in your template?
Hey Tom,
Just to be clear this is the W3C validator and not the browsers reporting this problem?
The only thing I can think off, is that it may not like the filename of the JavaScript file, so I recommend you rename the file to chromeless_player.js
Let me know how that goes, as the W3C validator might have a strict rule about filenames or getting confused what the file extension might be.
Cheers,
Warren
I have a head tag (!) and, without the offending line, the page validates.
The issue crops up with both browsers and the W3C validator.
Renaming as suggested seems to have solved the issue - but it's an odd one. Plenty of jQuery plugins have multiple periods in the filename...
Thanks Warren!
Hey Tom,
Not sure why it would be a problem, but glad to hear you have it fixed.
Warren
is working on a reply...