Hi wysocki,
Thanks for the extra info about the CountrySpecificContent package. I've included that as well.
This has taken me all day to figure out the real problem!
Everything was being output by the server but the scripts were not running with MY template.
I kept thinking it was caused by one of 3 things;
a) as mentioned in first post, the setting of URL Configuration and Hostnames in the System section, or
b) as you suggested, with Cookie already existing (but I was removing cookies between tests, and never saw the actual AcceptAlert cookie being created), or
c) something to do with the position within the <body> and <div> sections that I was placing the two functions.
It was none of these.
I compared it against a page based on the basic starter site template which WAS working ok and then analysed using Firebug.
It was giving errors relating to jQuery not being referenced.
Eventually discovered that it was because I had created two PageTemplateFeature files for use in my master Razor template;
1) one to group together all of my <head> files (Meta tags, links to CSS, Favicon, etc)
2) second to group all of my Script files together (jQuery, minified scripts, Html5Shiv, etc)
The issue was that I had positioned the @PageTemplateFeature("Template Javascript Files") line right near the bottom of the <body> section so scripts would be loaded after main page content.
Damn it! jQuery needs to be positioned early in the page so it loads before other scripts.
The AcceptAlert and CountrySpecificContent packages insert their relevant <script> tags at bottom of the <head> section, well before jQuery was loaded and this was causing them to fail.
God I hate web dev.
Thanks for the extra info about the CountrySpecificContent package. I've included that as well.
This has taken me all day to figure out the real problem!
Everything was being output by the server but the scripts were not running with MY template.
I kept thinking it was caused by one of 3 things;
a) as mentioned in first post, the setting of URL Configuration and Hostnames in the System section, or
b) as you suggested, with Cookie already existing (but I was removing cookies between tests, and never saw the actual AcceptAlert cookie being created), or
c) something to do with the position within the <body> and <div> sections that I was placing the two functions.
It was none of these.
I compared it against a page based on the basic starter site template which WAS working ok and then analysed using Firebug.
It was giving errors relating to jQuery not being referenced.
Eventually discovered that it was because I had created two PageTemplateFeature files for use in my master Razor template;
1) one to group together all of my <head> files (Meta tags, links to CSS, Favicon, etc)
2) second to group all of my Script files together (jQuery, minified scripts, Html5Shiv, etc)
The issue was that I had positioned the @PageTemplateFeature("Template Javascript Files") line right near the bottom of the <body> section so scripts would be loaded after main page content.
Damn it! jQuery needs to be positioned early in the page so it loads before other scripts.
The AcceptAlert and CountrySpecificContent packages insert their relevant <script> tags at bottom of the <head> section, well before jQuery was loaded and this was causing them to fail.
God I hate web dev.