<head> content dynamically moved to <body>

Permalink
When setting up a new Concrete5 site and a new theme, the contents of the <head> are being moved to the <body> dynamically.

Page Source looks ok, but when viewing the generated output in Firebug or Chrome Dev Tools, you get the contents moved to the <body> and the <head> is empty.

The knock on effect is a slightly screwed up page render, too...

1 Attachment

GavMurphy
 
jbx replied on at Permalink Reply
jbx
Freaky! I reckon it must be the theme...
Do you have a live link, or could you send me a copy of your theme?
GavMurphy replied on at Permalink Reply 1 Attachment
GavMurphy
Here you go (see attached) - work in progress, so not live and constantly being worked on. The static site it is going to replace is here:http://www.volare.net.nz

There is a couple of block nav templates referenced in the theme which I haven't included, but apart from that it should all be there.

As well as the messed up dynamic output, there is a strange empty string added immediately after the body tag that is causing the main logo to get pushed down. This isn't the editor bar as the blank string and broken logo position is there with or without the bar.

Something strange going on and even if I remove the Loader for 'header_required' and other scripts, it still happens, so guessing it's something in C5...also happens with JS disabled.

Cheers,

Gav
jordanlev replied on at Permalink Reply
jordanlev
That is freaky. The only thing I can see after a quick glance at your code is that you're include jquery yourself, which you don't want to do because C5 already includes Jquery so if you load it yourself there's now 2 of them and they cause all kinds of weird conflicts.

Kind of sucks I know because you are using a newer version -- I think if you need to use the newer version of jquery instead though you can just drop that file into your site's top-level "js" directory and call it "jquery.js" (without the ".min" and without the version number in the file name), and C5 will use that one instead of its own.
Note that you'll need to move your <?php Loader::element('header_required'); ?> up higher so it happens before you bring in the slimbox and other js things, because that's where C5 outputs its jquery reference.
GavMurphy replied on at Permalink Reply
GavMurphy
Thanks, Jordanlev, but I tried removing the jQuery and it didn't fix either of my issues. I'll keep researching. Thanks again.
ThemeGuru replied on at Permalink Reply
ThemeGuru
Um.. Looks fine when your not in edit mode...

You probably should do this:

http://defunctlife.com/2010/06/concrete5-edit-bar-is-in-the-way-how...

Hope that helps :-)
GavMurphy replied on at Permalink Reply 1 Attachment
GavMurphy
ThemeGuru, the issue with the logo and the nav being pushed down the page occurs whether in edit mode or not.

The edit bar works fine and the corrupted layout occurs whether the bar is there or not.

What I don't understand is why C5 appears to be moving all the head content into the body and adding in the empty string in the process (which is the main antagonist of the misplaced page elements).

I've attached an image showing the output of theme with the incorrectly pushed down logo (circled in red) due to the inserted blank string, and the dynamically moved Head elements to the start of the Body (circled in red again).
GavMurphy replied on at Permalink Reply
GavMurphy
Resolved by Shotster as part of the following issue:

http://www.concrete5.org/community/forums/customizing_c5/empty-text...