.AtHead() Misbehaving

Topics: Core, General, Troubleshooting
Jun 6, 2012 at 7:38 PM

Can anyone think of a reason why the .AtHead() would not include scripts when the page is rendering?

This is affecting all Script.Include() function across my Orchard site (even: Script.Include("html5.js").UseCondition("lt IE 9").AtHead(); in Document.cshtml)

But the .AtFoot() is working fine.

Coordinator
Jun 6, 2012 at 7:44 PM

I have never seen that.

Is it possible that you have another Document.cshtml in a Theme which would conflict ?

Jun 6, 2012 at 7:52 PM
Edited Jun 6, 2012 at 10:56 PM

I scanned all my themes and it came up with two: my theme and the SafeMode.  I only just created the Document.cshtml in my theme once I figured out what was going on so I could manually drop some IE8/7 scripts in it.

The themes that are in the theme folder are 'My Theme', SafeMode, TheAdmin, and TheThemeMachine.  Of which, only my theme is the only theme being loaded.

The site is on v1.4.2

Jun 7, 2012 at 7:28 AM

There's two other weird things going on with this site I can't figure out.  All pages except the home page has what looks to be some sort of an ID being thrown on the end of the URL just as the page finnishes to load (WWW.THISISTHEURL.com/SOMEPAGE#.T9A2SrBYuVP).  The 'ID' is changing with each page load and I haven't seen the same 'ID' repeat yet.  And I the order of the widgets seem to be ignored in the header and the footer.  

The shape tracing tool seems to lie to me now and then too.  For example, I have tree widgets in the footer on the default layer (2 menus and 1 HTML).

...On a hunch I renamed the Zone.cshtml alternate in my theme (the only thing in that alternate is @DisplayChildren(Model)) so Orchard would not use it and that corrected the tracing tool and the ordering of the widgets... My designer won't be happy with me though 'shrug'.  That at least explains part of my mystery.